feduke-nukem / flutter_easy_dialogs

Easy dialogs library for Flutter
https://pub.dev/packages/flutter_easy_dialogs
MIT License
13 stars 0 forks source link

[Question]: How to hide a dialog by tapping outside #22

Closed DevTello closed 9 months ago

DevTello commented 10 months ago

What is your question?

How to hide a dialog by tapping outside?

Code of Conduct

DevTello commented 10 months ago

Works, wrapped my fullscreen dialog's content with Stack, where the first child is GestureDetector( onTap: dialog.hide, child: SizedBox.expand( child: Container(color: Colors.transparent), ), ), But maybe there are other, simpler ways of doing this...

feduke-nukem commented 9 months ago

Works, wrapped my fullscreen dialog's content with Stack, where the first child is GestureDetector( onTap: dialog.hide, child: SizedBox.expand( child: Container(color: Colors.transparent), ), ), But maybe there are other, simpler ways of doing this...

Hi.

You can call this code whenever you want, and it will hide the current full-screen dialog.

 FlutterEasyDialogs.hide(FullScreenDialog.identifier());