Flushbar<T> constructor

Flushbar<T>({
  1. Key? key,
  2. String? title,
  3. Color? titleColor,
  4. double? titleSize,
  5. String? message,
  6. double? messageSize,
  7. Color? messageColor,
  8. Widget? titleText,
  9. Widget? messageText,
  10. Widget? icon,
  11. bool shouldIconPulse = true,
  12. double? maxWidth,
  13. EdgeInsets margin = const EdgeInsets.all(0.0),
  14. EdgeInsets padding = const EdgeInsets.all(16),
  15. BorderRadius? borderRadius,
  16. TextDirection textDirection = TextDirection.ltr,
  17. Color? borderColor,
  18. double borderWidth = 1.0,
  19. Color backgroundColor = const Color(0xFF303030),
  20. Color? leftBarIndicatorColor,
  21. List<BoxShadow>? boxShadows,
  22. Gradient? backgroundGradient,
  23. Widget? mainButton,
  24. OnTap? onTap,
  25. Duration? duration,
  26. bool isDismissible = true,
  27. FlushbarDismissDirection dismissDirection = FlushbarDismissDirection.VERTICAL,
  28. bool showProgressIndicator = false,
  29. AnimationController? progressIndicatorController,
  30. Color? progressIndicatorBackgroundColor,
  31. Animation<Color>? progressIndicatorValueColor,
  32. FlushbarPosition flushbarPosition = FlushbarPosition.BOTTOM,
  33. double positionOffset = 0.0,
  34. FlushbarStyle flushbarStyle = FlushbarStyle.FLOATING,
  35. Curve forwardAnimationCurve = Curves.easeOutCirc,
  36. Curve reverseAnimationCurve = Curves.easeOutCirc,
  37. Duration animationDuration = const Duration(seconds: 1),
  38. FlushbarStatusCallback? onStatusChanged,
  39. double barBlur = 0.0,
  40. bool blockBackgroundInteraction = false,
  41. double? routeBlur,
  42. Color? routeColor,
  43. Form? userInputForm,
  44. Offset? endOffset,
  45. FlushbarRoute<T?>? flushbarRoute,
})

Implementation

Flushbar(
    {Key? key,
    this.title,
    this.titleColor,
    this.titleSize,
    this.message,
    this.messageSize,
    this.messageColor,
    this.titleText,
    this.messageText,
    this.icon,
    this.shouldIconPulse = true,
    this.maxWidth,
    this.margin = const EdgeInsets.all(0.0),
    this.padding = const EdgeInsets.all(16),
    this.borderRadius,
    this.textDirection = TextDirection.ltr,
    this.borderColor,
    this.borderWidth = 1.0,
    this.backgroundColor = const Color(0xFF303030),
    this.leftBarIndicatorColor,
    this.boxShadows,
    this.backgroundGradient,
    this.mainButton,
    this.onTap,
    this.duration,
    this.isDismissible = true,
    this.dismissDirection = FlushbarDismissDirection.VERTICAL,
    this.showProgressIndicator = false,
    this.progressIndicatorController,
    this.progressIndicatorBackgroundColor,
    this.progressIndicatorValueColor,
    this.flushbarPosition = FlushbarPosition.BOTTOM,
    this.positionOffset = 0.0,
    this.flushbarStyle = FlushbarStyle.FLOATING,
    this.forwardAnimationCurve = Curves.easeOutCirc,
    this.reverseAnimationCurve = Curves.easeOutCirc,
    this.animationDuration = const Duration(seconds: 1),
    FlushbarStatusCallback? onStatusChanged,
    this.barBlur = 0.0,
    this.blockBackgroundInteraction = false,
    this.routeBlur,
    this.routeColor,
    this.userInputForm,
    this.endOffset,
    this.flushbarRoute // Please dont init this
    })
    // ignore: prefer_initializing_formals
    : onStatusChanged = onStatusChanged,
      super(key: key) {
  onStatusChanged = onStatusChanged ?? (status) {};
}