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

Showing dialogs can be easy and better #3

Closed topperspal closed 1 year ago

topperspal commented 2 years ago
QuickAlert.success(context: context);

// or

QuickAlert.success(context); // context as positional parameter

QuickAlert.success(context, message: "File downloaded successfully!");

instead of

QuickAlert.show(
  context: context,
  type: QuickAlertType.success,
);
ItsAkashS22 commented 1 year ago

Hello @topperspal 👋

Yes i could have structured the alert as mentioned above using multiple static functions, but to my perspective and analysis of runtime data, using enum QuickAlertType is a good option, it reduces duplicate lines of code and enables effective reuseability. And many more advantages.

Thank you, Happy Coding ✨