From 658fa562cf2bf252f403c1e962823ced27da39c0 Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Sat, 3 Oct 2026 20:58:11 -0400 Subject: [PATCH] `await route.completed` before assuming settings are popped --- lib/controllers/settings_sections.dart | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/controllers/settings_sections.dart b/lib/controllers/settings_sections.dart index cedd81a..df1e64d 100644 --- a/lib/controllers/settings_sections.dart +++ b/lib/controllers/settings_sections.dart @@ -271,8 +271,10 @@ class SettingsSectionsController return M3EButton.icon( onPressed: () async { 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 .read(UnifiedPushController.provider.notifier)