Flash<T> constructor

Flash<T>({
  1. Key? key,
  2. required FlashController controller,
  3. required Widget child,
  4. EdgeInsets margin = EdgeInsets.zero,
  5. BorderRadius? borderRadius,
  6. Color? borderColor,
  7. double borderWidth = 1.0,
  8. Brightness brightness = Brightness.light,
  9. Color backgroundColor = Colors.white,
  10. List<BoxShadow>? boxShadows,
  11. Gradient? backgroundGradient,
  12. GestureTapCallback? onTap,
  13. bool enableDrag = true,
  14. HorizontalDismissDirection? horizontalDismissDirection,
  15. Duration insetAnimationDuration = const Duration(milliseconds: 100),
  16. Curve insetAnimationCurve = Curves.fastOutSlowIn,
  17. AlignmentGeometry? alignment,
  18. FlashPosition? position = FlashPosition.bottom,
  19. FlashStyle? style = FlashStyle.floating,
  20. Curve forwardAnimationCurve = Curves.fastOutSlowIn,
  21. Curve reverseAnimationCurve = Curves.fastOutSlowIn,
  22. double? barrierBlur,
  23. Color? barrierColor,
  24. bool barrierDismissible = true,
})

Implementation

Flash({
  Key? key,
  required this.controller,
  required this.child,
  this.margin = EdgeInsets.zero,
  this.borderRadius,
  this.borderColor,
  this.borderWidth = 1.0,
  this.brightness = Brightness.light,
  this.backgroundColor = Colors.white,
  this.boxShadows,
  this.backgroundGradient,
  this.onTap,
  this.enableDrag = true,
  this.horizontalDismissDirection,
  this.insetAnimationDuration = const Duration(milliseconds: 100),
  this.insetAnimationCurve = Curves.fastOutSlowIn,
  this.alignment,
  this.position = FlashPosition.bottom,
  this.style = FlashStyle.floating,
  this.forwardAnimationCurve = Curves.fastOutSlowIn,
  this.reverseAnimationCurve = Curves.fastOutSlowIn,
  this.barrierBlur,
  this.barrierColor,
  this.barrierDismissible = true,
})  : assert(() {
        if (alignment == null)
          return style != null && position != null;
        else
          return style == null && position == null;
      }()),
      super(key: key);