fix not in range error when logging out
This commit is contained in:
parent
b8b074b229
commit
e54b059bc9
1 changed files with 8 additions and 4 deletions
|
|
@ -269,12 +269,16 @@ class SettingsSectionsController
|
||||||
final colorScheme = Theme.of(context).colorScheme;
|
final colorScheme = Theme.of(context).colorScheme;
|
||||||
return M3EButton.icon(
|
return M3EButton.icon(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
await ref
|
final container = ProviderScope.containerOf(context);
|
||||||
.watch(UnifiedPushController.provider.notifier)
|
Navigator.of(context)
|
||||||
|
.popUntil((route) => route.isFirst);
|
||||||
|
|
||||||
|
await container
|
||||||
|
.read(UnifiedPushController.provider.notifier)
|
||||||
.deregister()
|
.deregister()
|
||||||
.onError(showError);
|
.onError(showError);
|
||||||
await ref
|
await container
|
||||||
.watch(ClientController.provider.notifier)
|
.read(ClientController.provider.notifier)
|
||||||
.logout()
|
.logout()
|
||||||
.onError(showError);
|
.onError(showError);
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue