belovance / QuickAlert

An instantly ready, full-featured alerts for development on any platform with flutter. Enabling you to complete projects and deploy quickly. With QuickAlert, you can display animated alert dialogs such as success, error, warning, confirm, loading or even a custom dialog.
https://pub.dev/packages/quickalert
MIT License
46 stars 42 forks source link

QuickAlert.cancel() must have been added since day 1 #14

Closed Mu7ammadRasul closed 1 year ago

Mu7ammadRasul commented 1 year ago

i'm navigating a user into another page in which when i get back to the main page the dialog is still existing which is super annoying.

there should have been a 'cancelation' to fix the issue, note that i tried Navigator.pop() but it crushes the app.

ItsAkashS22 commented 1 year ago

Hello @Mu7ammadRasul 👋

You can achieve this with 2 ways,

  1. Pop the dialog 1st and then push to new page.

    QuicklAlert.show(...).whenCompleted((){
    Navigator.push(...);
    });
  2. Push a new page 1st and on return back pop the dialog.

    QuicklAlert.show(
    onConfirmBtnTap: () {
    Navigator.push(...).whenCompleted((){
      Navigator.pop();
    });
    },
    );

    I hope this solves the issue, this package is built for very easy usage so that even the beginners can understand, hence advanced options or controllers are not implemented. Happy Coding ✨