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

Cancel button with QuickAlertType.loading #31

Closed AviKenz closed 5 months ago

AviKenz commented 5 months ago

Hello,

Thanks for the wonderful library. I rarely see such a clean and well maintained library ! 🥇

https://github.com/belovance/QuickAlert/blob/d3ebc5e41e77d899310051b132579d84cefa3d71/lib/widgets/quickalert_container.dart#L148

According to the code line above, no button is shown when the alert type is QuickAlertType.loading

Please provide a way to show the cancel button even for QuickAlertType.loading.

Why ? sometimes you want to give the user the possibility to cancel a loading process. Sure the user can still tap outside of the dialog to dismiss or "cancel" but that is not a clean way from the UX perspective.

Thanks in advance and HAPPY CODING :)

ItsAkashS22 commented 5 months ago

Hello @AviKenz 👋🏻

Thanks for your feedback, now you can use cancel button in QuickAlertType.loading by passing showCancelBtn: true and use onCancelBtnTap for custom logic.

Happy Coding ✨