Open erf opened 1 year ago
I wonder if OverlayPortal would help with this? Like if alert dialogs were done with OverlayPortal instead of showDialog, then would we be able to rebuild them when their parameters changed like a normal widget? CC @LongCatIsLooong
Use case
I would like to make a
AlertDialog
dismissible determined conditionally by the state of the data in aTextField
. E.g. if the user have written some text, i don't want him to accidentally press outside the dialog and dismiss it without saving changes, but if he's only having a peek at some content, he should be able to dismiss it by pressing outside. Right now you can only setbarrierDismissible
onshowDialog
as a boolean when showing it.Proposal
I would like some way to make the dialog dismissible based on some state in the
AlertDialog
. Perhaps pass aDismissibleController
toshowDialog
which i can also pass to theDialog
and update as needed. E.g. the dialog can set dismissible true or false based on e.g. the state of aTextField
.