Skip to content

[go_router] Update sype safe routing topic to use mixin from go_router_builder 3.0.0 #9422

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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
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 @@
## 15.2.3

- Updates Type-safe routes topic documentation to use the mixin from `go_router_builder` 3.0.0.

## 15.2.2

- Fixes calling `PopScope.onPopInvokedWithResult` in branch routes.
Expand Down
8 changes: 4 additions & 4 deletions packages/go_router/doc/type-safe-routes.md
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -28,15 +28,15 @@ 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();
}
}

@immutable
class SongRoute extends GoRouteData {
class SongRoute extends GoRouteData with _$SongRoute {
final int id;

const SongRoute({
Expand Down Expand Up @@ -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
[build_verify]: https://pub.dev/packages/build_verify
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: 15.2.2
version: 15.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