CustomSlidableAction constructor

const CustomSlidableAction({
  1. Key? key,
  2. int flex = _kFlex,
  3. Color backgroundColor = _kBackgroundColor,
  4. Color? foregroundColor,
  5. bool autoClose = _kAutoClose,
  6. BorderRadius borderRadius = BorderRadius.zero,
  7. EdgeInsets? padding,
  8. required SlidableActionCallback? onPressed,
  9. required Widget child,
})

Creates a CustomSlidableAction.

The flex, backgroundColor, autoClose and child arguments must not be null.

The flex argument must also be greater than 0.

Implementation

const CustomSlidableAction({
  Key? key,
  this.flex = _kFlex,
  this.backgroundColor = _kBackgroundColor,
  this.foregroundColor,
  this.autoClose = _kAutoClose,
  this.borderRadius = BorderRadius.zero,
  this.padding,
  required this.onPressed,
  required this.child,
})  : assert(flex > 0),
      super(key: key);