Added User Profile Screen

This commit is contained in:
2026-02-18 21:42:48 +08:00
parent 35eae623d8
commit 372928d8e7
6 changed files with 606 additions and 5 deletions
+18 -5
View File
@@ -57,11 +57,14 @@ class AppScaffold extends ConsumerWidget {
tooltip: 'Account',
onSelected: (value) {
if (value == 0) {
context.go('/profile');
} else if (value == 1) {
ref.read(authControllerProvider).signOut();
}
},
itemBuilder: (context) => const [
PopupMenuItem(value: 0, child: Text('Sign out')),
PopupMenuItem(value: 0, child: Text('My profile')),
PopupMenuItem(value: 1, child: Text('Sign out')),
],
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 12),
@@ -77,10 +80,20 @@ class AppScaffold extends ConsumerWidget {
),
)
else
IconButton(
tooltip: 'Sign out',
onPressed: () => ref.read(authControllerProvider).signOut(),
icon: const Icon(Icons.logout),
Row(
mainAxisSize: MainAxisSize.min,
children: [
IconButton(
tooltip: 'Profile',
onPressed: () => context.go('/profile'),
icon: const Icon(Icons.account_circle),
),
IconButton(
tooltip: 'Sign out',
onPressed: () => ref.read(authControllerProvider).signOut(),
icon: const Icon(Icons.logout),
),
],
),
const _NotificationBell(),
],