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;
|
final colorScheme = Theme.of(context).colorScheme;
|
||||||
return M3EButton.icon(
|
return M3EButton.icon(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
|
Navigator.of(
|
||||||
|
context,
|
||||||
|
).popUntil((route) => route.isFirst);
|
||||||
|
|
||||||
|
await WidgetsBinding.instance.endOfFrame;
|
||||||
|
|
||||||
await ref
|
await ref
|
||||||
.watch(ClientController.provider.notifier)
|
.watch(ClientController.provider.notifier)
|
||||||
.logout();
|
.logout();
|
||||||
if (context.mounted) Navigator.of(context).pop();
|
|
||||||
},
|
},
|
||||||
label: Text(title),
|
label: Text(title),
|
||||||
icon: Icon(icon),
|
icon: Icon(icon),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue