Need help with Preventing back gesture with a child slot component #767
-
Hi arkivanov, great library you've created. Just had a quick question if you don't mine. So I basically have a parent screen called PostDetail which has a child slot component integrated for displaying a bottom sheet modal. Alongside that the app I've setup such that it allows predictive back gesture IOS. The problem I'm facing is I don't know how to restrict the predictive back gesture when the child slot activates the modal, as I don't want to be able to dismiss the modal this way. Is there some way of only allowing the predictive back gesture to work when the modal is not showing. PostDetailComponent
Child Slot Component
Post Detail Screen `
` |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 11 replies
-
Do you want to completely disable the back button or only the predictive back gesture? Can you attach a video of how does it work now (i.e. without disabling)? |
Beta Was this translation helpful? Give feedback.
Thanks for the reproducer! After checking it, it looks like an issue with either the Cupertino widgets used inside
PostDetailScreen
, or with the code related to nested scrolling. The predictive back gesture gets disabled correctly because you havehandleBackButton = true
specified for the Child Slot. It looks like an issue with the modal widget itself.I suggest to try reproducing the issue without Cupertino and/or with the pager. If not reproducible, then maybe file an issue in the Cupertino's repository. I couldn't try it myself because for some reason the IDE shows an internal error and the syntax highlighting is disabled (only for this project).