50 lines
1.4 KiB
Dart
50 lines
1.4 KiB
Dart
import 'package:flutter/material.dart';
|
|
import '../../../../core/constants/colors.dart';
|
|
import '../../../../domain/entities/user.dart';
|
|
|
|
class UserInfoCard extends StatelessWidget {
|
|
final User user;
|
|
|
|
const UserInfoCard({Key? key, required this.user}) : super(key: key);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Card(
|
|
color: AppColors.cardColor,
|
|
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)),
|
|
elevation: 2,
|
|
child: Padding(
|
|
padding: const EdgeInsets.all(16.0),
|
|
child: Column(
|
|
children: [
|
|
CircleAvatar(
|
|
radius: 50,
|
|
backgroundImage: NetworkImage(user.profileImageUrl),
|
|
backgroundColor: Colors.transparent,
|
|
),
|
|
const SizedBox(height: 10),
|
|
Text(
|
|
'${user.userFirstName} ${user.userLastName}',
|
|
style: const TextStyle(
|
|
fontSize: 24,
|
|
fontWeight: FontWeight.bold,
|
|
color: Colors.white,
|
|
letterSpacing: 1.2,
|
|
),
|
|
),
|
|
const SizedBox(height: 5),
|
|
Text(
|
|
user.email,
|
|
style: TextStyle(
|
|
fontSize: 14,
|
|
color: Colors.grey[600],
|
|
decoration: TextDecoration.underline,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|