marcos930807 / awesomeDialogs

A new Flutter package project for simple a awesome dialogs
Other
339 stars 110 forks source link

Feature to pass data from dialog #94

Closed OutdatedGuy closed 2 years ago

OutdatedGuy commented 2 years ago

New

Changes

marcos930807 commented 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.

OutdatedGuy commented 2 years ago

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.

OutdatedGuy commented 2 years ago

@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

marcos930807 commented 2 years ago

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

marcos930807 commented 2 years ago

Uploaded to Pub. DONE