flushbar static method
dynamic
flushbar(
- String message,
- BuildContext context, {
- Color? iconColor,
- IconData? icon,
- Color? backgroundColor,
Implementation
static flushbar(
String message,
BuildContext context, {
Color? iconColor,
IconData? icon,
Color? backgroundColor,
}) {
Flushbar(
forwardAnimationCurve: Curves.decelerate,
margin: const EdgeInsets.symmetric(horizontal: 20, vertical: 10),
padding: const EdgeInsets.all(15),
message: message,
duration: const Duration(seconds: 3),
borderRadius: BorderRadius.circular(8),
flushbarPosition: FlushbarPosition.TOP,
backgroundColor: backgroundColor ?? Colors.black,
reverseAnimationCurve: Curves.easeInOut,
positionOffset: 20,
icon: Icon(
icon ?? Icons.error,
size: 28,
color: iconColor ?? Colors.white,
),
).show(context);
}