Flutter_dismissible_page
Flutter_dismissible_page copied to clipboard
Prevent dragging programatically
It would be cool with a way to programatically set whether or not dragging was disabled, e.g. adding the option to pass an async callback function that determines whether or not dragging is disabled, or by adding some kind of controller.
The reason is with only having it as a property is it will cause all childs to re-render.
We have a scenario where when keyboard is visible we want to disable dragging, and when we do this, a re-render is triggered causing the keyboard (for some reason) to loose it's focus
@simplenotezy why don't you wrap the DismissiblePage in a StreamBuilder
and alter the DismissiblePageDismissDirection
to be none
when the keyboard is visible?
Using a StreamBuilder
you can alter the DismissiblePageDismissDirection
without all the children being rerendered.