diff --git a/packages/go_router/CHANGELOG.md b/packages/go_router/CHANGELOG.md index 0d9ac751373..9f16c167aa4 100644 --- a/packages/go_router/CHANGELOG.md +++ b/packages/go_router/CHANGELOG.md @@ -1,3 +1,7 @@ +## 6.5.4 + +- Remove navigator keys from `TypedGoRoute` and `TypedShellRoute`. + ## 6.5.3 - Fixes redirect being called with an empty location for unknown routes. @@ -15,11 +19,12 @@ - Supports returning values on pop. ## 6.4.1 + - Adds `initialExtra` to **GoRouter** to pass extra data alongside `initialRoute`. ## 6.4.0 -- Adds `replace` method to that replaces the current route with a new one and keeps the same page key. This is useful for when you want to update the query params without changing the page key ([#115902]https://github.com/flutter/flutter/issues/115902). +- Adds `replace` method to that replaces the current route with a new one and keeps the same page key. This is useful for when you want to update the query params without changing the page key ([#115902](https://github.com/flutter/flutter/issues/115902)). ## 6.3.0 @@ -38,7 +43,6 @@ - Adds `GoRouter.maybeOf` to get the closest `GoRouter` from the context, if there is any. - ## 6.0.10 - Adds helpers for go_router_builder for ShellRoute support @@ -222,8 +226,8 @@ ## 4.2.9 -* Updates text theme parameters to avoid deprecation issues. -* Fixes lint warnings. +- Updates text theme parameters to avoid deprecation issues. +- Fixes lint warnings. ## 4.2.8 diff --git a/packages/go_router/lib/src/route.dart b/packages/go_router/lib/src/route.dart index f8a22172a5e..7f4b9c12868 100644 --- a/packages/go_router/lib/src/route.dart +++ b/packages/go_router/lib/src/route.dart @@ -292,13 +292,11 @@ class GoRoute extends RouteBase { /// re-evaluation will be triggered if the [InheritedWidget] changes. final GoRouterRedirect? redirect; - /// {@template go_router.GoRoute.parentNavigatorKey} /// An optional key specifying which Navigator to display this route's screen /// onto. /// /// Specifying the root Navigator will stack this route onto that /// Navigator instead of the nearest ShellRoute ancestor. - /// {@endtemplate} final GlobalKey? parentNavigatorKey; // TODO(chunhtai): move all regex related help methods to path_utils.dart. @@ -456,10 +454,8 @@ class ShellRoute extends RouteBase { /// sub-route's observers. final List? observers; - /// {@template go_router.ShellRoute.navigatorKey} /// The [GlobalKey] to be used by the [Navigator] built for this route. /// All ShellRoutes build a Navigator by default. Child GoRoutes /// are placed onto this Navigator instead of the root Navigator. - /// {@endtemplate} final GlobalKey navigatorKey; } diff --git a/packages/go_router/lib/src/route_data.dart b/packages/go_router/lib/src/route_data.dart index 2be9c36478b..3530ca250fc 100644 --- a/packages/go_router/lib/src/route_data.dart +++ b/packages/go_router/lib/src/route_data.dart @@ -224,7 +224,6 @@ class TypedGoRoute extends TypedRoute { const TypedGoRoute({ required this.path, this.routes = const >[], - this.parentNavigatorKey, }); /// The path that corresponds to this route. @@ -238,9 +237,6 @@ class TypedGoRoute extends TypedRoute { /// /// See [RouteBase.routes]. final List> routes; - - /// {@macro go_router.GoRoute.parentNavigatorKey} - final GlobalKey? parentNavigatorKey; } /// A superclass for each typed shell route descendant @@ -249,16 +245,12 @@ class TypedShellRoute extends TypedRoute { /// Default const constructor const TypedShellRoute({ this.routes = const >[], - this.navigatorKey, }); /// Child route definitions. /// /// See [RouteBase.routes]. final List> routes; - - /// {@macro go_router.ShellRoute.navigatorKey} - final GlobalKey? navigatorKey; } /// Internal class used to signal that the default page behavior should be used. diff --git a/packages/go_router/pubspec.yaml b/packages/go_router/pubspec.yaml index b9e11e10cc9..a2867054219 100644 --- a/packages/go_router/pubspec.yaml +++ b/packages/go_router/pubspec.yaml @@ -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: 6.5.3 +version: 6.5.4 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