copyWith method

ZetaSlidableAction copyWith({
  1. VoidCallback? onPressed,
  2. IconData? icon,
  3. Color? customForegroundColor,
  4. Color? customBackgroundColor,
  5. ZetaColorSwatch? color,
  6. String? semanticLabel,
  7. bool? paleColor,
})

Creates a copy of this ZetaSlidableAction but with the given fields replaced with the new values.

Implementation

ZetaSlidableAction copyWith({
  VoidCallback? onPressed,
  IconData? icon,
  Color? customForegroundColor,
  Color? customBackgroundColor,
  ZetaColorSwatch? color,
  String? semanticLabel,
  bool? paleColor,
}) {
  return ZetaSlidableAction._(
    key: key,
    onPressed: onPressed ?? this.onPressed,
    icon: icon ?? this.icon,
    customForegroundColor: customForegroundColor ?? this.customForegroundColor,
    customBackgroundColor: customBackgroundColor ?? this.customBackgroundColor,
    color: color ?? this.color,
    semanticLabel: semanticLabel ?? this.semanticLabel,
    paleColor: paleColor ?? this.paleColor,
    type: _type,
  );
}