Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fix formatting, add TODO
  • Loading branch information
goderbauer committed May 7, 2024
commit 4f22503a8a8bb8b0c1b6effd92d1c4b3dbdb441f
8 changes: 6 additions & 2 deletions packages/go_router/lib/src/parser.dart
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ class GoRouteInformationParser extends RouteInformationParser<RouteMatchList> {
return debugParserFuture = _redirect(context, matchList)
.then<RouteMatchList>((RouteMatchList value) {
if (value.isError && onParserException != null) {
return onParserException!(context, value); // ignore: use_build_context_synchronously
// TODO(chunhtai): Figure out what to return if context is invalid.
// ignore: use_build_context_synchronously
return onParserException!(context, value);
}
return value;
});
Expand Down Expand Up @@ -106,7 +108,9 @@ class GoRouteInformationParser extends RouteInformationParser<RouteMatchList> {
initialMatches,
).then<RouteMatchList>((RouteMatchList matchList) {
if (matchList.isError && onParserException != null) {
return onParserException!(context, matchList); // ignore: use_build_context_synchronously
// TODO(chunhtai): Figure out what to return if context is invalid.
// ignore: use_build_context_synchronously
return onParserException!(context, matchList);
}

assert(() {
Expand Down