Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Showing dialogs can be easy and better #3

Closed
topperspal opened this issue Aug 29, 2022 · 1 comment
Closed

Showing dialogs can be easy and better #3

topperspal opened this issue Aug 29, 2022 · 1 comment
Assignees
Labels
question Further information is requested

Comments

@topperspal
Copy link

topperspal commented Aug 29, 2022

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 ItsAkashS22 self-assigned this Aug 29, 2022
@ItsAkashS22 ItsAkashS22 added the question Further information is requested label Aug 29, 2022
@ItsAkashS22
Copy link
Member

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 ✨

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants