Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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.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**.
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.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

Expand Down