copyWith method

AlertStyle copyWith({
  1. Color? color,
  2. Color? backgroundColor,
  3. IconData? icon,
  4. double? iconSize,
  5. bool? showIcon,
  6. String? title,
  7. TextStyle? titleStyle,
  8. double? titleGap,
  9. TextStyle? textStyle,
  10. double? barWidth,
  11. Radius? borderRadius,
  12. EdgeInsetsGeometry? padding,
  13. EdgeInsetsGeometry? margin,
  14. AlertStyle? note,
  15. AlertStyle? tip,
  16. AlertStyle? important,
  17. AlertStyle? warning,
  18. AlertStyle? caution,
})

A copy with the given fields replaced.

Implementation

AlertStyle copyWith({
  Color? color,
  Color? backgroundColor,
  IconData? icon,
  double? iconSize,
  bool? showIcon,
  String? title,
  TextStyle? titleStyle,
  double? titleGap,
  TextStyle? textStyle,
  double? barWidth,
  Radius? borderRadius,
  EdgeInsetsGeometry? padding,
  EdgeInsetsGeometry? margin,
  AlertStyle? note,
  AlertStyle? tip,
  AlertStyle? important,
  AlertStyle? warning,
  AlertStyle? caution,
}) {
  return AlertStyle(
    color: color ?? this.color,
    backgroundColor: backgroundColor ?? this.backgroundColor,
    icon: icon ?? this.icon,
    iconSize: iconSize ?? this.iconSize,
    showIcon: showIcon ?? this.showIcon,
    title: title ?? this.title,
    titleStyle: titleStyle ?? this.titleStyle,
    titleGap: titleGap ?? this.titleGap,
    textStyle: textStyle ?? this.textStyle,
    barWidth: barWidth ?? this.barWidth,
    borderRadius: borderRadius ?? this.borderRadius,
    padding: padding ?? this.padding,
    margin: margin ?? this.margin,
    note: note ?? this.note,
    tip: tip ?? this.tip,
    important: important ?? this.important,
    warning: warning ?? this.warning,
    caution: caution ?? this.caution,
  );
}