Enhance navigation and error handling; implement global navigator and messenger keys, update schedule progress retrieval, and improve error messaging in various services

This commit is contained in:
Sven laptop
2026-05-17 22:29:41 +02:00
parent 0e10757c49
commit 73de0d713e
11 changed files with 430 additions and 63 deletions
+12 -5
View File
@@ -67,11 +67,18 @@ class RouteCard extends StatelessWidget {
// Ignore status update errors here; navigation should still open.
}
Navigator.of(context).push(
MaterialPageRoute(
builder: (context) => NavigationScreen(route: route),
),
);
try {
await Navigator.of(context).push(
MaterialPageRoute(
builder: (context) => NavigationScreen(route: route),
),
);
} catch (e) {
// Surface navigation errors to the user so they can report/log.
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(content: Text('Navigatiefout: ${e.toString()}')),
);
}
},
borderRadius: BorderRadius.circular(20),
splashFactory: InkSparkle.splashFactory,