Closed OutdatedGuy closed 2 years ago
Hi @OutdatedGuy Thanks for your contribution. Apparently there are breaking changes in your PR, according to what I checked, onDismissCallback will not be executed in some circumstances, such as when using the back button in Android or press in barrier dismissable or when using custom Buttons and closing the dialog via Navigator. Am I missing something? That is precisely why this code snippet was there:
.then((_) {
isDissmisedBySystem = true;
if (onDissmissCallback != null) onDissmissCallback?.call(_dismissType);
This guaranteed that no matter what the scenario was, the OnDissmisCallback would always be executed. Can you check those escenarios.
Ohhh, I'm sorry, I didn't realize that was the case. Let me try fix it.
Btw, @marcos930807 thanks for this amazing package. I love it very much.
@marcos930807, I fixed the issue for Back Button Pressed
and Barrier Dismiss
so that onDissmissCallback
function will be executed for them.
Please check and let me know of any other changes
Hi @OutdatedGuy Thanks merging now i will later change a little detail
if (onDissmissCallback != null) { onDissmissCallback?.call(_dismissType); }
That check is not needed because de callback use a safe call operator.
Thanks Again
Uploaded to Pub. DONE
New
Changes
autoDismiss
set to true by defaultautoDismiss
is false,onDissmissCallback
must be provided to pop the dialog