Ezaldeen99 / material_dialogs

A Flutter library aims to help you create animated, simple, and stylish Material Dialogs in your app.
Apache License 2.0
94 stars 47 forks source link

Closing dialog programmatically #4

Closed Ro-El closed 3 years ago

Ro-El commented 3 years ago

Hi,

Currently opening a materialDialog from a bottomMaterialDialog causes the bottomMaterialDialog to persist. Meaning that two taps are required to exit from both dialogs back to the main screen.

Seems like a method to close a dialog programmatically would help circumvent this problem.

Ezaldeen99 commented 3 years ago

Hi, I will start to work on such a feature to add it in the next release

Ro-El commented 3 years ago

Hi, I will start to work on such a feature to add it in the next release

You can achieve the desired effect by using navigator.pop(context) before calling the second dialog. Not sure if a more elegant solution is possible.

Ezaldeen99 commented 3 years ago

great to know that you have it done

akhilgorantala commented 2 years ago

@Ro-El can u explain properly once.