IconSlideAction constructor

const IconSlideAction({
  1. Key? key,
  2. IconData? icon,
  3. Widget? iconWidget,
  4. String? caption,
  5. Color? color,
  6. Color? foregroundColor,
  7. VoidCallback? onTap,
  8. bool closeOnTap = _kCloseOnTap,
})

Creates a slide action with an icon, a caption if set and a background color.

The closeOnTap argument must not be null.

Implementation

const IconSlideAction({
  Key? key,
  this.icon,
  this.iconWidget,
  this.caption,
  Color? color,
  this.foregroundColor,
  VoidCallback? onTap,
  bool closeOnTap = _kCloseOnTap,
})  : assert(icon != null || iconWidget != null,
          'Either set icon or iconWidget.'),
      super(
        key: key,
        color: color ?? Colors.white,
        onTap: onTap,
        closeOnTap: closeOnTap,
      );