Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
chunhtai committed Aug 16, 2024
1 parent 0e6e452 commit 92c610d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
24 changes: 12 additions & 12 deletions packages/go_router/lib/src/parser.dart
Original file line number Diff line number Diff line change
Expand Up @@ -198,25 +198,25 @@ class GoRouteInformationParser extends RouteInformationParser<RouteMatchList> {
return newMatchList;
}
return baseRouteMatchList.push(
ImperativeRouteMatch(
pageKey: _getUniqueValueKey(),
completer: completer!,
matches: newMatchList,
),
);
ImperativeRouteMatch(
pageKey: _getUniqueValueKey(),
completer: completer!,
matches: newMatchList,
),
);
case NavigatingType.replace:
final RouteMatch routeMatch = baseRouteMatchList!.last;
baseRouteMatchList = baseRouteMatchList.remove(routeMatch);
if (baseRouteMatchList.isEmpty) {
return newMatchList;
}
return baseRouteMatchList.push(
ImperativeRouteMatch(
pageKey: routeMatch.pageKey,
completer: completer!,
matches: newMatchList,
),
);
ImperativeRouteMatch(
pageKey: routeMatch.pageKey,
completer: completer!,
matches: newMatchList,
),
);
case NavigatingType.go:
return newMatchList;
case NavigatingType.restore:
Expand Down
2 changes: 1 addition & 1 deletion packages/go_router/test/go_router_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ void main() {
});

testWidgets('pushReplacement and replace when only one matches',
(WidgetTester tester) async {
(WidgetTester tester) async {
final List<GoRoute> routes = <GoRoute>[
GoRoute(name: '1', path: '/', builder: dummy),
GoRoute(name: '2', path: '/a', builder: dummy),
Expand Down

0 comments on commit 92c610d

Please sign in to comment.