Added User Profile Screen
This commit is contained in:
@@ -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(),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user