From 162543ceebc6a06a06cb6f173c8e664f11b582a7 Mon Sep 17 00:00:00 2001 From: ValentinVignal Date: Fri, 13 Jun 2025 15:35:49 +0800 Subject: [PATCH 1/2] Update documentation to use mixin --- packages/go_router/doc/type-safe-routes.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/go_router/doc/type-safe-routes.md b/packages/go_router/doc/type-safe-routes.md index f23397f357d..10d308ba0f7 100644 --- a/packages/go_router/doc/type-safe-routes.md +++ b/packages/go_router/doc/type-safe-routes.md @@ -1,5 +1,5 @@ Instead of using URL strings to navigate, go_router supports -type-safe routes using the go_router_builder package. +type-safe routes using the go_router_builder package. To get started, add [go_router_builder][], [build_runner][], and [build_verify][] to the dev_dependencies section of your pubspec.yaml: @@ -28,7 +28,7 @@ part 'go_router_builder.g.dart'; ] ) @immutable -class HomeScreenRoute extends GoRouteData { +class HomeScreenRoute extends GoRouteData with _$HomeScreenRoute { @override Widget build(BuildContext context, GoRouterState state) { return const HomeScreen(); @@ -36,7 +36,7 @@ class HomeScreenRoute extends GoRouteData { } @immutable -class SongRoute extends GoRouteData { +class SongRoute extends GoRouteData with _$SongRoute { final int id; const SongRoute({ @@ -74,4 +74,4 @@ package documentation](https://pub.dev/documentation/go_router_builder/latest/). [go_router_builder]: https://pub.dev/packages/go_router_builder [build_runner]: https://pub.dev/packages/build_runner -[build_verify]: https://pub.dev/packages/build_verify \ No newline at end of file +[build_verify]: https://pub.dev/packages/build_verify From 9ede0391730ad518ab4eed6161f62c6da037ce8d Mon Sep 17 00:00:00 2001 From: ValentinVignal Date: Fri, 13 Jun 2025 15:46:12 +0800 Subject: [PATCH 2/2] Update version number --- packages/go_router/CHANGELOG.md | 4 ++++ packages/go_router/pubspec.yaml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/go_router/CHANGELOG.md b/packages/go_router/CHANGELOG.md index feba3bdfa0e..e0c8c869a00 100644 --- a/packages/go_router/CHANGELOG.md +++ b/packages/go_router/CHANGELOG.md @@ -1,3 +1,7 @@ +## 15.2.1 + +- Updates Type-safe routes topic documentation to use the mixin from `go_router_builder` 3.0.0. + ## 15.2.0 - `GoRouteData` now defines `.location`, `.go(context)`, `.push(context)`, `.pushReplacement(context)`, and `replace(context)` to be used for [Type-safe routing](https://pub.dev/documentation/go_router/latest/topics/Type-safe%20routes-topic.html). **Requires go_router_builder >= 3.0.0**. diff --git a/packages/go_router/pubspec.yaml b/packages/go_router/pubspec.yaml index 9367be85902..190f17af393 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: 15.2.0 +version: 15.2.1 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