Flushbar<T> constructor

Flushbar<T>({
  1. Key? key,
  2. required Widget titleText,
  3. Widget? messageText,
  4. Widget? icon,
  5. Function? onUndo,
  6. OnTap? onTap,
  7. Duration? duration,
  8. EdgeInsets margin = const EdgeInsets.all(24),
  9. EdgeInsets padding = const EdgeInsets.symmetric(vertical: 12, horizontal: 16),
  10. BorderRadius? borderRadius = const BorderRadius.all(Radius.circular(8)),
  11. Color backgroundColor = const Color.fromRGBO(23, 23, 23, 1),
  12. 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))],
  13. bool isDismissible = true,
  14. FlushbarDismissDirection dismissDirection = FlushbarDismissDirection.VERTICAL,
  15. FlushbarPosition flushbarPosition = FlushbarPosition.BOTTOM,
  16. FlushbarStyle flushbarStyle = FlushbarStyle.FLOATING,
  17. Curve forwardAnimationCurve = Curves.easeOutCirc,
  18. Curve reverseAnimationCurve = Curves.easeOutCirc,
  19. Duration animationDuration = const Duration(seconds: 300),
  20. FlushbarStatusCallback? onStatusChanged,
  21. double barBlur = 0.0,
  22. bool blockBackgroundInteraction = false,
  23. double? routeBlur,
  24. Color? routeColor,
  25. 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) {};
}