cmdrootaccess / another-flushbar

A flexible widget for user notification. Customize your text, button, duration, animations and much more. For Android devs, it is made to replace Snackbars and Toasts.
https://pub.dev/packages/another_flushbar
MIT License
145 stars 88 forks source link

feat: add copyWith method #125

Open definitelyme opened 10 months ago

definitelyme commented 10 months ago

Example usage: create a blank Flushbar() and manually dismiss it somewhere else.

var fb = Flushbar(...);

fb = fb.copyWith(
   mainButton: TextButton(
       onPressed: () {
           fb.dismiss(); // dismiss it here
       }
   ),
);

fb.show(context);