From 5bc70c73e8182c87382c3034a3ffe5f9f55151fc Mon Sep 17 00:00:00 2001 From: GP4cK Date: Fri, 28 Apr 2023 23:18:33 +0800 Subject: [PATCH] [go_router] Remove unused navigator keys (#3708) Remove unused navigator keys from GoRouteData and ShellRouteData. Closes https://github.com/flutter/flutter/issues/124497 --- packages/go_router/CHANGELOG.md | 6 +++++- packages/go_router/lib/src/route_data.dart | 8 -------- packages/go_router/pubspec.yaml | 2 +- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/packages/go_router/CHANGELOG.md b/packages/go_router/CHANGELOG.md index 0977df25f78d..a0d78041b852 100644 --- a/packages/go_router/CHANGELOG.md +++ b/packages/go_router/CHANGELOG.md @@ -1,3 +1,7 @@ +## 6.5.9 + +- Removes navigator keys from `GoRouteData` and `ShellRouteData`. + ## 6.5.8 - Adds name parameter to `TypedGoRoute` @@ -16,7 +20,7 @@ ## 6.5.4 -- Remove navigator keys from `TypedGoRoute` and `TypedShellRoute`. +- Removes navigator keys from `TypedGoRoute` and `TypedShellRoute`. ## 6.5.3 diff --git a/packages/go_router/lib/src/route_data.dart b/packages/go_router/lib/src/route_data.dart index fbf396126c32..23e6740342f1 100644 --- a/packages/go_router/lib/src/route_data.dart +++ b/packages/go_router/lib/src/route_data.dart @@ -121,11 +121,6 @@ abstract class GoRouteData extends RouteData { static final Expando _stateObjectExpando = Expando( 'GoRouteState to GoRouteData expando', ); - - /// [navigatorKey] is used to point to a certain navigator - /// - /// It will use the given key to find the right navigator for [GoRoute] - GlobalKey? get navigatorKey => null; } /// Base class for supporting @@ -208,9 +203,6 @@ abstract class ShellRouteData extends RouteData { Expando( 'GoRouteState to ShellRouteData expando', ); - - /// It will be used to instantiate [Navigator] with the given key - GlobalKey? get navigatorKey => null; } /// A superclass for each typed route descendant diff --git a/packages/go_router/pubspec.yaml b/packages/go_router/pubspec.yaml index 3d1562db2980..bf4b67279b4f 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.8 +version: 6.5.9 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