marcos930807 / awesomeDialogs

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

Prevent Default Closing of Dialog on OK Button Click #84

Closed Alecckie closed 2 years ago

Alecckie commented 2 years ago

Thank you for your awesome plugin. When processing a form using the dialog, I'd like to be able to perform some field validation upon OK Button click without closing the dialog first, then close the dialog manually upon successful validation.

Is there a method like, closeDialogOnOk:false with an option to dialog.dismiss() for manual dismissing?

marcos930807 commented 2 years ago

You can use a custom button for ok and cancel, in that case the handle of closing the dialog is up to you using dialog.dismiss(), whenever a validation or any other logic pass.

Alecckie commented 2 years ago

Works perfectly ... thanks. Custom button with Navigator.pop works perfectly.

Ronjack commented 2 years ago

image

this works for me