-
Notifications
You must be signed in to change notification settings - Fork 30.1k
Description
Use case
When using GoRouter or another navigator 2.0 implementation which is inherently declarative it is difficult to reproduce the showModalBottomSheet behaviour.
I would expect to be able to push a bottomSheet onto the page stack of the router instead of adding it to the [Navigator]
Thats what is causing this issue: #100933
When trying to recreate the modal behaviour in a CustomTransitionPage in GoRouter we have this issue blocking us:
#102289
Proposal
-
We should have access to _ModalBottomSheetRoute and or the underlying classes.
-
We should consider adding adding documentation to gorouter.dev on how to use BottomSheets with GoRouter to avoid problems like [go_router] ModalBottomSheet is not popped when using GoRouter.pop() #100933
Further reading
There are community solutions like simple_cupertino_modal_route.dart but it would be more consistent to have access to the already existing navigator 1 version, especially for anybody considering to transition to Navigator 2.0
There is an open SO question on this as well: https://stackoverflow.com/questions/70478220/how-do-i-declaratively-push-bottomsheet-with-navigator-2-0