ZetaSlidableAction constructor

const ZetaSlidableAction({
  1. Key? key,
  2. VoidCallback? onPressed,
  3. required IconData icon,
  4. ZetaColorSwatch? color,
  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,
  this.customForegroundColor,
  this.customBackgroundColor,
  this.semanticLabel,
  this.paleColor = false,
})  : _type = _ZetaSlidableActionType.custom,
      assert(
        (customForegroundColor == null && customBackgroundColor == null) ||
            (customForegroundColor != null && customBackgroundColor != null),
        'Ensure both customForegroundColor and customBackgroundColor are either both null or both not null.',
      );