Skip to content

Commit 1848690

Browse files
author
Lukas Gundermann
committed
refactor: Replace inline "Not Found" UI with NotFoundScreen
This commit refactors the `errorBuilder` in the `GoRouter` configuration. The inline `Column` widget used for displaying the "Not Found" page has been extracted and replaced with a dedicated `NotFoundScreen` widget. This improves code organization and reusability.
1 parent 749327b commit 1848690

1 file changed

Lines changed: 1 addition & 12 deletions

File tree

lib/routes/route_config.dart

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -36,18 +36,7 @@ class RouteConfig {
3636
return MaterialPage(
3737
key: state.pageKey,
3838
child: Scaffold(
39-
child: Column(
40-
mainAxisSize: MainAxisSize.min,
41-
children: [
42-
const Text(
43-
'Die angeforderte Seite konnte nicht gefunden werden.',
44-
).h4,
45-
PrimaryButton(
46-
onPressed: () => context.pushNamed(RouteNames.home),
47-
child: const Text('Zurück zum Dashboard'),
48-
),
49-
],
50-
).gap(10).center(),
39+
child: NotFoundScreen(),
5140
),
5241
);
5342
},

0 commit comments

Comments
 (0)