Skip to content

Commit a38fbe1

Browse files
Update packages/go_router/test/on_enter_test.dart
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
1 parent 52fbbb6 commit a38fbe1

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

packages/go_router/test/on_enter_test.dart

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1539,18 +1539,8 @@ void main() {
15391539

15401540
router = GoRouter(
15411541
initialLocation: '/home',
1542-
onEnter:
1543-
(
1544-
BuildContext context,
1545-
GoRouterState current,
1546-
GoRouterState next,
1547-
GoRouter router,
1548-
) {
1549-
if (next.uri.path == '/blocked') {
1550-
return const Block.stop();
1551-
}
1552-
return const Allow();
1553-
},
1542+
onEnter: (_, __, next, ___) =>
1543+
next.uri.path == '/blocked' ? const Block.stop() : const Allow(),
15541544
routes: <RouteBase>[
15551545
GoRoute(
15561546
path: '/home',

0 commit comments

Comments
 (0)