Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Autoformat
  • Loading branch information
stuartmorgan-g committed Aug 15, 2025
commit f5b292e52b03a3d76a43c2f7a3dd3d149aec6d2f
353 changes: 180 additions & 173 deletions packages/go_router_builder/example/lib/all_extension_types.dart

Large diffs are not rendered by default.

409 changes: 218 additions & 191 deletions packages/go_router_builder/example/lib/all_extension_types.g.dart

Large diffs are not rendered by default.

513 changes: 251 additions & 262 deletions packages/go_router_builder/example/lib/all_types.dart

Large diffs are not rendered by default.

976 changes: 536 additions & 440 deletions packages/go_router_builder/example/lib/all_types.g.dart

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -15,26 +15,22 @@ class CaseSensitivityApp extends StatelessWidget {
CaseSensitivityApp({super.key});

@override
Widget build(BuildContext context) => MaterialApp.router(
routerConfig: _router,
);
Widget build(BuildContext context) =>
MaterialApp.router(routerConfig: _router);

final GoRouter _router = GoRouter(
initialLocation: '/case-sensitive',
routes: $appRoutes,
);
}

@TypedGoRoute<CaseSensitiveRoute>(
path: '/case-sensitive',
)
@TypedGoRoute<CaseSensitiveRoute>(path: '/case-sensitive')
class CaseSensitiveRoute extends GoRouteData with _$CaseSensitiveRoute {
const CaseSensitiveRoute();

@override
Widget build(BuildContext context, GoRouterState state) => const Screen(
title: 'Case Sensitive',
);
Widget build(BuildContext context, GoRouterState state) =>
const Screen(title: 'Case Sensitive');
}

@TypedGoRoute<NotCaseSensitiveRoute>(
Expand All @@ -45,9 +41,8 @@ class NotCaseSensitiveRoute extends GoRouteData with _$NotCaseSensitiveRoute {
const NotCaseSensitiveRoute();

@override
Widget build(BuildContext context, GoRouterState state) => const Screen(
title: 'Not Case Sensitive',
);
Widget build(BuildContext context, GoRouterState state) =>
const Screen(title: 'Not Case Sensitive');
}

class Screen extends StatelessWidget {
Expand All @@ -56,20 +51,18 @@ class Screen extends StatelessWidget {
final String title;
@override
Widget build(BuildContext context) => Scaffold(
appBar: AppBar(
title: Text(title),
appBar: AppBar(title: Text(title)),
body: ListView(
children: <Widget>[
ListTile(
title: const Text('Case Sensitive'),
onTap: () => context.go('/case-sensitive'),
),
body: ListView(
children: <Widget>[
ListTile(
title: const Text('Case Sensitive'),
onTap: () => context.go('/case-sensitive'),
),
ListTile(
title: const Text('Not Case Sensitive'),
onTap: () => context.go('/not-case-sensitive'),
),
],
ListTile(
title: const Text('Not Case Sensitive'),
onTap: () => context.go('/not-case-sensitive'),
),
);
],
),
);
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 5 additions & 7 deletions packages/go_router_builder/example/lib/extra_example.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ class App extends StatelessWidget {

@override
Widget build(BuildContext context) {
return MaterialApp.router(
routerConfig: _router,
);
return MaterialApp.router(routerConfig: _router);
}
}

Expand Down Expand Up @@ -103,13 +101,13 @@ class Splash extends StatelessWidget {
children: <Widget>[
const Placeholder(),
ElevatedButton(
onPressed: () =>
const RequiredExtraRoute($extra: Extra(1)).go(context),
onPressed:
() => const RequiredExtraRoute($extra: Extra(1)).go(context),
child: const Text('Required Extra'),
),
ElevatedButton(
onPressed: () =>
const OptionalExtraRoute($extra: Extra(2)).go(context),
onPressed:
() => const OptionalExtraRoute($extra: Extra(2)).go(context),
child: const Text('Optional Extra'),
),
ElevatedButton(
Expand Down
46 changes: 17 additions & 29 deletions packages/go_router_builder/example/lib/extra_example.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading