Flushbar<T> constructor

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

Implementation

Flushbar(
    {Key? key,
    this.title,
    this.safeArea = true,
    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) {};
}