make logout properly pop all settings on mobile
This commit is contained in:
parent
80b938c0be
commit
370549072e
1 changed files with 6 additions and 1 deletions
|
|
@ -106,10 +106,15 @@ class SettingsSectionsController
|
|||
final colorScheme = Theme.of(context).colorScheme;
|
||||
return M3EButton.icon(
|
||||
onPressed: () async {
|
||||
Navigator.of(
|
||||
context,
|
||||
).popUntil((route) => route.isFirst);
|
||||
|
||||
await WidgetsBinding.instance.endOfFrame;
|
||||
|
||||
await ref
|
||||
.watch(ClientController.provider.notifier)
|
||||
.logout();
|
||||
if (context.mounted) Navigator.of(context).pop();
|
||||
},
|
||||
label: Text(title),
|
||||
icon: Icon(icon),
|
||||
|
|
|
|||
Loading…
Reference in a new issue