GlassSwipeAction constructor

const GlassSwipeAction({
  1. required Widget icon,
  2. Widget? label,
  3. required VoidCallback onTap,
  4. Color? backgroundColor,
  5. Color? foregroundColor = CupertinoColors.white,
  6. bool isDestructive = false,
  7. bool closeOnTap = true,
  8. int flex = 1,
  9. String? semanticLabel,
})

Creates a swipe action.

Implementation

const GlassSwipeAction({
  required this.icon,
  this.label,
  required this.onTap,
  this.backgroundColor,
  this.foregroundColor = CupertinoColors.white,
  this.isDestructive = false,
  this.closeOnTap = true,
  this.flex = 1,
  this.semanticLabel,
}) : assert(flex > 0, 'flex must be greater than 0');