Skip to content

Commit

Permalink
[go_router] redirect example signature fix (flutter#7278)
Browse files Browse the repository at this point in the history
  • Loading branch information
piedcipher authored Aug 5, 2024
1 parent 9308857 commit 59aa310
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions packages/go_router/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 14.2.3

- Fixes redirect example's signature in `route.dart`.

## 14.2.2

- Adds section for "Stateful nested navigation" to configuration.md.
Expand Down
8 changes: 4 additions & 4 deletions packages/go_router/lib/src/route.dart
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ typedef ExitCallback = FutureOr<bool> Function(
/// routes: <GoRoute>[
/// GoRoute(
/// path: '/',
/// redirect: (_) => '/family/${Families.data[0].id}',
/// redirect: (_, __) => '/family/${Families.data[0].id}',
/// ),
/// GoRoute(
/// path: '/family',
Expand Down Expand Up @@ -169,7 +169,7 @@ abstract class RouteBase with Diagnosticable {
/// routes: <GoRoute>[
/// GoRoute(
/// path: '/',
/// redirect: (_) => '/family/${Families.data[0].id}',
/// redirect: (_, __) => '/family/${Families.data[0].id}',
/// ),
/// GoRoute(
/// path: '/family/:fid',
Expand All @@ -188,11 +188,11 @@ abstract class RouteBase with Diagnosticable {
/// routes: <GoRoute>[
/// GoRoute(
/// path: '/',
/// redirect: (_) => '/page1', // this takes priority over the sub-route.
/// redirect: (_, __) => '/page1', // this takes priority over the sub-route.
/// routes: <GoRoute>[
/// GoRoute(
/// path: 'child',
/// redirect: (_) => '/page2',
/// redirect: (_, __) => '/page2',
/// ),
/// ],
/// ),
Expand Down
2 changes: 1 addition & 1 deletion packages/go_router/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: go_router
description: A declarative router for Flutter based on Navigation 2 supporting
deep linking, data-driven routes and more
version: 14.2.2
version: 14.2.3
repository: https://github.com/flutter/packages/tree/main/packages/go_router
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+go_router%22

Expand Down

0 comments on commit 59aa310

Please sign in to comment.