copyWith method

SnackBarAction copyWith({
  1. String? label,
  2. VoidCallback? onPressed,
  3. Color? textColor,
  4. Color? disabledTextColor,
  5. Color? backgroundColor,
  6. Color? disabledBackgroundColor,
})

Implementation

SnackBarAction copyWith({
  String? label,
  VoidCallback? onPressed,
  Color? textColor,
  Color? disabledTextColor,
  Color? backgroundColor,
  Color? disabledBackgroundColor,
}) {
  return SnackBarAction(
    textColor: textColor ?? this.textColor,
    disabledTextColor: disabledTextColor ?? this.disabledTextColor,
    backgroundColor: backgroundColor ?? this.backgroundColor,
    disabledBackgroundColor:
        disabledBackgroundColor ?? this.disabledBackgroundColor,
    label: label ?? this.label,
    onPressed: onPressed ?? this.onPressed,
  );
}