ZetaSlidableAction constructor

const ZetaSlidableAction({
  1. Key? key,
  2. VoidCallback? onPressed,
  3. required IconData icon,
  4. ZetaColorSwatch? color = ZetaColorBase.blue,
  5. Color? customForegroundColor,
  6. Color? customBackgroundColor,
  7. String? semanticLabel,
  8. bool paleColor = false,
})

Constructs a ZetaSlidableAction.

Implementation

const ZetaSlidableAction({
  super.key,
  this.onPressed,
  required this.icon,
  this.color = ZetaColorBase.blue,
  this.customForegroundColor,
  this.customBackgroundColor,
  this.semanticLabel,
  this.paleColor = false,
})  : _type = _ZetaSlidableActionType.custom,
      assert(
        color != null || (customForegroundColor != null && customBackgroundColor != null),
        'Ensure either color, or both customForegroundColor and customBackgroundColor are provided.',
      );