XSlidableAction constructor

const XSlidableAction({
  1. Key? key,
  2. int flex = _kFlex,
  3. Color backgroundColor = _kBackgroundColor,
  4. Color? foregroundColor,
  5. bool autoClose = _kAutoClose,
  6. required SlidableActionCallback? onPressed,
  7. IconData? icon,
  8. double spacing = 4,
  9. String? label,
  10. BorderRadius borderRadius = BorderRadius.zero,
  11. EdgeInsets? padding,
  12. Uint8List? icon_Image,
})

Creates a SlidableAction.

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

You must set either an icon or a label.

The flex argument must also be greater than 0.

Implementation

const XSlidableAction({
  Key? key,
  this.flex = _kFlex,
  this.backgroundColor = _kBackgroundColor,
  this.foregroundColor,
  this.autoClose = _kAutoClose,
  required this.onPressed,
  this.icon,
  this.spacing = 4,
  this.label,
  this.borderRadius = BorderRadius.zero,
  this.padding,
  this.icon_Image,
})  : assert(flex > 0),
      assert(icon != null || label != null),
      super(key: key);