Can't figure how to handle Cancel/Ok
eloipeloux opened this issue · comments
Hey there,
I've just added your package to my project and it works like a charm.
I'm just having an issue, I can't quite understand how to cancel or proceed action.
Here's my situation :
I'm implementing a Dismissable
item, when I want to confirm it I use your showOkCancelAlertDialog
confirmDismiss: (direction) async { showOkCancelAlertDialog(...)}
I want to dismiss the current item but wether I'm clicking on Cancel or OK, the dialog disappears and the Dismissible
item remains ...
This is what I want :
OK --> the item dismisses and calls onDismissed
statement
Cancel --> I guess Navigator.of(context).pop()
?
Couldn't understand how worked the onWillPop
statement as-well (I'm new to Flutter).
Can you give me some help please ? Thanks :)
P.S.: I took a look at the examples provided in the repo but couldn't have the answer to my problem :(
It looks like a Dismissible question, not an adaptive_dialog question.
It seems to be resolved by confirmDismiss.