await route.completed before assuming settings are popped
This commit is contained in:
parent
fe33ae2e97
commit
658fa562cf
1 changed files with 4 additions and 2 deletions
|
|
@ -271,8 +271,10 @@ class SettingsSectionsController
|
||||||
return M3EButton.icon(
|
return M3EButton.icon(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
final container = ProviderScope.containerOf(context);
|
final container = ProviderScope.containerOf(context);
|
||||||
Navigator.of(context)
|
|
||||||
.popUntil((route) => route.isFirst);
|
final route = ModalRoute.of(context)!;
|
||||||
|
Navigator.of(context).popUntil((r) => r.isFirst);
|
||||||
|
await route.completed;
|
||||||
|
|
||||||
await container
|
await container
|
||||||
.read(UnifiedPushController.provider.notifier)
|
.read(UnifiedPushController.provider.notifier)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue