Route unknown paths back to map
Build and deploy Flutter Web / build (push) Successful in 2m44s

This commit is contained in:
Ruslan Bakiev
2026-06-12 22:50:07 +07:00
parent ba85f31cef
commit 4d36f5f9ae
+8 -1
View File
@@ -17,6 +17,7 @@ class AddExperienceArgs {
GoRouter createAppRouter() {
return GoRouter(
errorBuilder: (context, state) => const MapflowShell(),
routes: [
GoRoute(
path: '/',
@@ -25,7 +26,13 @@ GoRouter createAppRouter() {
GoRoute(
path: 'experience/new',
pageBuilder: (context, state) {
final args = state.extra as AddExperienceArgs;
final extra = state.extra;
final args = extra is AddExperienceArgs
? extra
: const AddExperienceArgs(
coordinate: null,
hasTelegramAuth: true,
);
return CustomTransitionPage<void>(
fullscreenDialog: true,
key: state.pageKey,