Flushbar<T> constructor
Flushbar<T> ({
- Key? key,
- required Widget titleText,
- Widget? messageText,
- Widget? icon,
- Function? onUndo,
- OnTap? onTap,
- Duration? duration,
- EdgeInsets margin = const EdgeInsets.all(24),
- EdgeInsets padding = const EdgeInsets.symmetric(vertical: 12, horizontal: 16),
- BorderRadius? borderRadius = const BorderRadius.all(Radius.circular(8)),
- Color backgroundColor = const Color.fromRGBO(23, 23, 23, 1),
- List<
BoxShadow> ? boxShadows = const [BoxShadow(offset: Offset(0, 8), blurRadius: 14, color: Color.fromRGBO(23, 23, 23, 0.08)), BoxShadow(offset: Offset(0, 3), blurRadius: 6, color: Color.fromRGBO(23, 23, 23, 0.12))], - bool isDismissible = true,
- FlushbarDismissDirection dismissDirection = FlushbarDismissDirection.VERTICAL,
- FlushbarPosition flushbarPosition = FlushbarPosition.BOTTOM,
- FlushbarStyle flushbarStyle = FlushbarStyle.FLOATING,
- Curve forwardAnimationCurve = Curves.easeOutCirc,
- Curve reverseAnimationCurve = Curves.easeOutCirc,
- Duration animationDuration = const Duration(seconds: 300),
- FlushbarStatusCallback? onStatusChanged,
- double barBlur = 0.0,
- bool blockBackgroundInteraction = false,
- double? routeBlur,
- Color? routeColor,
- FlushbarRoute<
T?> ? flushbarRoute,
Implementation
Flushbar({
Key? key,
required this.titleText,
this.messageText,
this.icon,
this.onUndo,
this.onTap,
this.duration,
this.margin = const EdgeInsets.all(24),
this.padding = const EdgeInsets.symmetric(
vertical: 12,
horizontal: 16,
),
this.borderRadius = const BorderRadius.all(Radius.circular(8)),
this.backgroundColor = const Color.fromRGBO(23, 23, 23, 1),
this.boxShadows = const [
BoxShadow(
offset: Offset(0, 8),
blurRadius: 14,
color: Color.fromRGBO(23, 23, 23, 0.08),
),
BoxShadow(
offset: Offset(0, 3),
blurRadius: 6,
color: Color.fromRGBO(23, 23, 23, 0.12),
),
],
this.isDismissible = true,
this.dismissDirection = FlushbarDismissDirection.VERTICAL,
this.flushbarPosition = FlushbarPosition.BOTTOM,
this.flushbarStyle = FlushbarStyle.FLOATING,
this.forwardAnimationCurve = Curves.easeOutCirc,
this.reverseAnimationCurve = Curves.easeOutCirc,
this.animationDuration = const Duration(seconds: 300),
FlushbarStatusCallback? onStatusChanged,
this.barBlur = 0.0,
this.blockBackgroundInteraction = false,
this.routeBlur,
this.routeColor,
this.flushbarRoute,
})
// ignore: prefer_initializing_formals
: onStatusChanged = onStatusChanged,
super(key: key) {
onStatusChanged = onStatusChanged ?? (status) {};
}