display appbar actions regardless if user is logged in or not

This commit is contained in:
krawieck 2020-12-03 22:45:50 +01:00
parent 4b51ea55fb
commit 929d9ebbcb
1 changed files with 15 additions and 8 deletions

View File

@ -18,8 +18,22 @@ class UserProfileTab extends HookWidget {
final theme = Theme.of(context);
final accountsStore = useAccountsStore();
final actions = [
IconButton(
icon: Icon(Icons.settings),
onPressed: () {
goTo(context, (_) => SettingsPage());
},
)
];
if (accountsStore.hasNoAccount) {
return Scaffold(
appBar: AppBar(
actions: actions,
backgroundColor: Colors.transparent,
shadowColor: Colors.transparent,
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
@ -100,14 +114,7 @@ class UserProfileTab extends HookWidget {
);
},
),
actions: [
IconButton(
icon: Icon(Icons.settings),
onPressed: () {
goTo(context, (_) => SettingsPage());
},
)
],
actions: actions,
),
body: UserProfile(
userId: accountsStore.defaultToken.payload.id,