File tree 4 files changed +12
-1
lines changed
4 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -72,6 +72,8 @@ class GoRouteInformationParser extends RouteInformationParser<RouteMatchList> {
72
72
return debugParserFuture = _redirect (context, matchList)
73
73
.then <RouteMatchList >((RouteMatchList value) {
74
74
if (value.isError && onParserException != null ) {
75
+ // TODO(chunhtai): Figure out what to return if context is invalid.
76
+ // ignore: use_build_context_synchronously
75
77
return onParserException !(context, value);
76
78
}
77
79
return value;
@@ -106,6 +108,8 @@ class GoRouteInformationParser extends RouteInformationParser<RouteMatchList> {
106
108
initialMatches,
107
109
).then <RouteMatchList >((RouteMatchList matchList) {
108
110
if (matchList.isError && onParserException != null ) {
111
+ // TODO(chunhtai): Figure out what to return if context is invalid.
112
+ // ignore: use_build_context_synchronously
109
113
return onParserException !(context, matchList);
110
114
}
111
115
Original file line number Diff line number Diff line change
1
+ ## 2.6.2
2
+
3
+ * Fixes a bug in the example app when accessing ` BuildContext ` .
4
+
1
5
## 2.6.1
2
6
3
7
* Fixes typo in ` durationDecoderHelperName ` .
Original file line number Diff line number Diff line change @@ -188,6 +188,9 @@ class HomeScreen extends StatelessWidget {
188
188
unawaited (FamilyCountRoute (familyData.length)
189
189
.push <int >(context)
190
190
.then ((int ? value) {
191
+ if (! context.mounted) {
192
+ return ;
193
+ }
191
194
if (value != null ) {
192
195
ScaffoldMessenger .of (context).showSnackBar (
193
196
SnackBar (
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ name: go_router_builder
2
2
description : >-
3
3
A builder that supports generated strongly-typed route helpers for
4
4
package:go_router
5
- version : 2.6.1
5
+ version : 2.6.2
6
6
repository : https://github.com/flutter/packages/tree/main/packages/go_router_builder
7
7
issue_tracker : https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+go_router_builder%22
8
8
You can’t perform that action at this time.
0 commit comments