Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
12 changes: 8 additions & 4 deletions packages/go_router/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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

Expand All @@ -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
Expand Down Expand Up @@ -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

Expand Down
4 changes: 0 additions & 4 deletions packages/go_router/lib/src/route.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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<NavigatorState>? parentNavigatorKey;

// TODO(chunhtai): move all regex related help methods to path_utils.dart.
Expand Down Expand Up @@ -456,10 +454,8 @@ class ShellRoute extends RouteBase {
/// sub-route's observers.
final List<NavigatorObserver>? 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<NavigatorState> navigatorKey;
}
8 changes: 0 additions & 8 deletions packages/go_router/lib/src/route_data.dart
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,6 @@ class TypedGoRoute<T extends GoRouteData> extends TypedRoute<T> {
const TypedGoRoute({
required this.path,
this.routes = const <TypedRoute<RouteData>>[],
this.parentNavigatorKey,
});

/// The path that corresponds to this route.
Expand All @@ -238,9 +237,6 @@ class TypedGoRoute<T extends GoRouteData> extends TypedRoute<T> {
///
/// See [RouteBase.routes].
final List<TypedRoute<RouteData>> routes;

/// {@macro go_router.GoRoute.parentNavigatorKey}
final GlobalKey<NavigatorState>? parentNavigatorKey;
}

/// A superclass for each typed shell route descendant
Expand All @@ -249,16 +245,12 @@ class TypedShellRoute<T extends ShellRouteData> extends TypedRoute<T> {
/// Default const constructor
const TypedShellRoute({
this.routes = const <TypedRoute<RouteData>>[],
this.navigatorKey,
});

/// Child route definitions.
///
/// See [RouteBase.routes].
final List<TypedRoute<RouteData>> routes;

/// {@macro go_router.ShellRoute.navigatorKey}
final GlobalKey<NavigatorState>? navigatorKey;
}

/// Internal class used to signal that the default page behavior should be used.
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: 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

Expand Down