Skip to content

Commit

Permalink
fix: [MDS-1006] Fix bottom sheet not closing on Storybook navigation (#…
Browse files Browse the repository at this point in the history
…365)

Co-authored-by: Birgitt Majas <birgitt.majas@yolo.com>
  • Loading branch information
GittHub-d and Birgitt Majas authored Feb 26, 2024
1 parent e6375e5 commit d1f1584
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions example/lib/src/storybook/routing/app_router.dart
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@ GoRouter router = GoRouter(
pageBuilder: (BuildContext context, GoRouterState state) => const NoTransitionPage(
child: BottomSheetStory(),
),
onExit: (BuildContext _) {
if (router.canPop()) router.pop();
return true;
},
),
GoRoute(
path: BreadcrumbStory.path,
Expand Down

0 comments on commit d1f1584

Please sign in to comment.