Skip to content

Commit 2a4beb2

Browse files
authored
[go_router] Add missing await keyword to onTap callback in the code example in navigation.md (#8343)
- Added the `async` keyword to the `onTap` callback in the code example in `navigation.md`.
1 parent 006504c commit 2a4beb2

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

packages/go_router/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 14.7.2
2+
3+
- Add missing `await` keyword to `onTap` callback in `navigation.md`.
4+
15
## 14.7.1
26

37
- Fixes return type of current state getter on `GoRouter` and `GoRouterDelegate` to be non-nullable.

packages/go_router/doc/navigation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ To try out the behavior yourself, see
118118
Waiting for a value to be returned:
119119

120120
```dart
121-
onTap: () {
121+
onTap: () async {
122122
final bool? result = await context.push<bool>('/page2');
123123
if(result ?? false)...
124124
}

packages/go_router/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: go_router
22
description: A declarative router for Flutter based on Navigation 2 supporting
33
deep linking, data-driven routes and more
4-
version: 14.7.1
4+
version: 14.7.2
55
repository: https://github.com/flutter/packages/tree/main/packages/go_router
66
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+go_router%22
77

0 commit comments

Comments
 (0)