2025-08-12 21:20:20 +07:00
|
|
|
import 'package:flutter/material.dart';
|
2025-08-16 19:56:45 +07:00
|
|
|
import 'package:line_icons/line_icons.dart';
|
2025-08-12 21:20:20 +07:00
|
|
|
|
2025-08-16 19:56:45 +07:00
|
|
|
import '../../../../common/extension/extension.dart';
|
2025-08-12 21:20:20 +07:00
|
|
|
import '../../../../common/theme/theme.dart';
|
2025-08-16 19:56:45 +07:00
|
|
|
import '../../../../domain/auth/auth.dart';
|
2025-08-12 21:20:20 +07:00
|
|
|
import 'divider.dart';
|
|
|
|
|
import 'profile_tile.dart';
|
|
|
|
|
|
|
|
|
|
class ProfileAccountInfo extends StatelessWidget {
|
2025-08-16 19:56:45 +07:00
|
|
|
final User user;
|
|
|
|
|
const ProfileAccountInfo({super.key, required this.user});
|
2025-08-12 21:20:20 +07:00
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
return Container(
|
|
|
|
|
margin: EdgeInsets.symmetric(horizontal: AppValue.margin),
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
color: AppColor.surface,
|
|
|
|
|
borderRadius: BorderRadius.circular(12),
|
|
|
|
|
boxShadow: [
|
|
|
|
|
BoxShadow(
|
|
|
|
|
color: Colors.black.withOpacity(0.05),
|
|
|
|
|
blurRadius: 10,
|
|
|
|
|
offset: const Offset(0, 2),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Padding(
|
|
|
|
|
padding: EdgeInsets.all(16),
|
|
|
|
|
child: Text(
|
|
|
|
|
'Account Information',
|
|
|
|
|
style: AppStyle.xl.copyWith(
|
|
|
|
|
fontSize: 18,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
color: AppColor.textPrimary,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
ProfileTile(
|
2025-08-16 19:56:45 +07:00
|
|
|
icon: LineIcons.envelope,
|
2025-08-12 21:20:20 +07:00
|
|
|
title: 'Email',
|
2025-08-16 19:56:45 +07:00
|
|
|
subtitle: user.email,
|
2025-08-12 21:20:20 +07:00
|
|
|
onTap: () {
|
|
|
|
|
// Edit email
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
ProfileDivider(),
|
|
|
|
|
|
|
|
|
|
ProfileTile(
|
2025-08-16 19:56:45 +07:00
|
|
|
icon: LineIcons.calendarAlt,
|
2025-08-12 21:20:20 +07:00
|
|
|
title: 'Member Since',
|
2025-08-16 19:56:45 +07:00
|
|
|
subtitle: user.createdAt.toDate,
|
2025-08-12 21:20:20 +07:00
|
|
|
showArrow: false,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|