copyWith method

  1. @override
AlertStyle copyWith({
  1. AlertVariant? variant,
  2. AlertSeverity? severity,
  3. double? width,
  4. double? height,
  5. EdgeInsetsGeometry? margin,
  6. EdgeInsetsGeometry? padding,
  7. Alignment? alignment,
  8. Clip? clipBehavior,
  9. bool? overlayDisabled,
  10. Color? overlayColor,
  11. Color? shadowColor,
  12. Color? surfaceTint,
  13. double? elevation,
  14. TextStyle? foregroundStyle,
  15. Color? foregroundColor,
  16. double? foregroundOpacity,
  17. int? foregroundAlpha,
  18. double? foregroundSpacing,
  19. bool? foregroundLoosen,
  20. bool? foregroundExpanded,
  21. CrossAxisAlignment? foregroundAlign,
  22. MainAxisAlignment? foregroundJustify,
  23. Color? backgroundColor,
  24. double? backgroundOpacity,
  25. int? backgroundAlpha,
  26. Color? borderColor,
  27. double? borderOpacity,
  28. int? borderAlpha,
  29. double? borderWidth,
  30. BorderRadius? borderRadius,
  31. BorderStyle? borderStyle,
  32. BoxShape? shape,
  33. Color? iconColor,
  34. double? iconOpacity,
  35. double? iconSize,
})
override

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

Implementation

@override
AlertStyle copyWith({
  AlertVariant? variant,
  AlertSeverity? severity,
  double? width,
  double? height,
  EdgeInsetsGeometry? margin,
  EdgeInsetsGeometry? padding,
  Alignment? alignment,
  Clip? clipBehavior,
  bool? overlayDisabled,
  Color? overlayColor,
  Color? shadowColor,
  Color? surfaceTint,
  double? elevation,
  TextStyle? foregroundStyle,
  Color? foregroundColor,
  double? foregroundOpacity,
  int? foregroundAlpha,
  double? foregroundSpacing,
  bool? foregroundLoosen,
  bool? foregroundExpanded,
  CrossAxisAlignment? foregroundAlign,
  MainAxisAlignment? foregroundJustify,
  Color? backgroundColor,
  double? backgroundOpacity,
  int? backgroundAlpha,
  Color? borderColor,
  double? borderOpacity,
  int? borderAlpha,
  double? borderWidth,
  BorderRadius? borderRadius,
  BorderStyle? borderStyle,
  BoxShape? shape,
  Color? iconColor,
  double? iconOpacity,
  double? iconSize,
}) {
  return AlertStyle(
    variant: variant ?? this.variant,
    severity: severity ?? this.severity,
    margin: margin ?? this.margin,
    padding: padding ?? this.padding,
    clipBehavior: clipBehavior ?? this.clipBehavior,
    shadowColor: shadowColor ?? this.shadowColor,
    surfaceTint: surfaceTint ?? this.surfaceTint,
    elevation: elevation ?? this.elevation,
    foregroundStyle: foregroundStyle ?? this.foregroundStyle,
    foregroundColor: foregroundColor ?? this.foregroundColor,
    foregroundOpacity: foregroundOpacity ?? this.foregroundOpacity,
    foregroundAlpha: foregroundAlpha ?? this.foregroundAlpha,
    foregroundSpacing: foregroundSpacing ?? this.foregroundSpacing,
    foregroundLoosen: foregroundLoosen ?? this.foregroundLoosen,
    foregroundExpanded: foregroundExpanded ?? this.foregroundExpanded,
    foregroundAlign: foregroundAlign ?? this.foregroundAlign,
    foregroundJustify: foregroundJustify ?? this.foregroundJustify,
    backgroundColor: backgroundColor ?? this.backgroundColor,
    backgroundOpacity: backgroundOpacity ?? this.backgroundOpacity,
    backgroundAlpha: backgroundAlpha ?? this.backgroundAlpha,
    borderColor: borderColor ?? this.borderColor,
    borderOpacity: borderOpacity ?? this.borderOpacity,
    borderAlpha: borderAlpha ?? this.borderAlpha,
    borderWidth: borderWidth ?? this.borderWidth,
    borderRadius: borderRadius ?? this.borderRadius,
    borderStyle: borderStyle ?? this.borderStyle,
    iconColor: iconColor ?? this.iconColor,
    iconOpacity: iconOpacity ?? this.iconOpacity,
    iconSize: iconSize ?? this.iconSize,
  );
}