Skip to content

Commit

Permalink
[go_router] Add missing await keyword to onTap callback in the code e…
Browse files Browse the repository at this point in the history
…xample in `navigation.md` (#8343)

- Added the `async` keyword to the `onTap` callback in the code example in `navigation.md`.
  • Loading branch information
Michae1Weiss authored Jan 28, 2025
1 parent 006504c commit 2a4beb2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
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 @@
## 14.7.2

- Add missing `await` keyword to `onTap` callback in `navigation.md`.

## 14.7.1

- Fixes return type of current state getter on `GoRouter` and `GoRouterDelegate` to be non-nullable.
Expand Down
2 changes: 1 addition & 1 deletion packages/go_router/doc/navigation.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ To try out the behavior yourself, see
Waiting for a value to be returned:

```dart
onTap: () {
onTap: () async {
final bool? result = await context.push<bool>('/page2');
if(result ?? false)...
}
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: 14.7.1
version: 14.7.2
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

0 comments on commit 2a4beb2

Please sign in to comment.