marcos930807 / awesomeDialogs

A new Flutter package project for simple a awesome dialogs
Other
340 stars 109 forks source link

btnOkOnPress function close and show black screen #16

Closed ndenisj closed 4 years ago

ndenisj commented 4 years ago
                                 AwesomeDialog(
                                      context: context,
                                      dialogType: DialogType.ERROR,
                                      animType: AnimType.RIGHSLIDE,
                                      headerAnimationLoop: false,
                                      tittle: 'Login Error',
                                      desc:
                                          'The phone number and password do not correspond, please check and try again.',
                                      btnOkOnPress: () {
                                        Navigator.of(context,
                                                rootNavigator: true)
                                            .pop();
                                      },
                                      btnOkColor: Colors.red,
                                    ).show();
marcos930807 commented 4 years ago

If you use btnOkOnPress function theres is no need to call Navigor.of(contex).pop because the dissmiss of the dialogue is handled internally. in your case the Navigator.of(context).pop is called twice one by the librery internally and one by you. Hop that help

ndenisj commented 4 years ago

If you use btnOkOnPress function theres is no need to call Navigor.of(contex).pop because the dissmiss of the dialogue is handled internally. in your case the Navigator.of(context).pop is called twice one by the librery internally and one by you. Hop that help

Thanks, it worked perfectly.