flushbar
flushbar copied to clipboard
How to close the animation?
I expect it to behave the same as snackBar, but I don't know how to turn off the animation.
What do you mean by turning it off? Not to have it animated at all, or dismissing it before the duration
expires?
To "turn off the animation" (I.e. to not have an animation when showing/hiding the Flushbar, use this:
animationDuration: Duration.zero,
To dismiss the Flushbar before the duration expires, use this:
// First, make sure to assign the created Flushbar to a parameter.
Flushbar flushbar = Flushbar(
animationDuration: Duration.zero,
...
);
// Display the Flushbar.
flushbar.show(context);
// Then dismiss it whenever you want.
flushbar.dismiss();