copyWith method
AvatarStyle
copyWith({
- double? size,
- BoxShape? shape,
- EdgeInsetsGeometry? margin,
- Clip? clipBehavior,
- Color? shadowColor,
- double? elevation,
- TextStyle? foregroundStyle,
- Color? foregroundColor,
- double? foregroundOpacity,
- int? foregroundAlpha,
- double? foregroundSpacing,
- Color? backgroundColor,
- double? backgroundOpacity,
- int? backgroundAlpha,
- Color? borderColor,
- double? borderOpacity,
- int? borderAlpha,
- double? borderWidth,
- BorderRadius? borderRadius,
- BorderStyle? borderStyle,
Creates a copy of this AvatarStyle but with the given fields replaced with the new values.
Implementation
AvatarStyle copyWith({
double? size,
BoxShape? shape,
EdgeInsetsGeometry? margin,
Clip? clipBehavior,
Color? shadowColor,
double? elevation,
TextStyle? foregroundStyle,
Color? foregroundColor,
double? foregroundOpacity,
int? foregroundAlpha,
double? foregroundSpacing,
Color? backgroundColor,
double? backgroundOpacity,
int? backgroundAlpha,
Color? borderColor,
double? borderOpacity,
int? borderAlpha,
double? borderWidth,
BorderRadius? borderRadius,
BorderStyle? borderStyle,
}) {
return AvatarStyle(
size: size ?? this.size,
shape: shape ?? this.shape,
margin: margin ?? this.margin,
clipBehavior: clipBehavior ?? this.clipBehavior,
shadowColor: shadowColor ?? this.shadowColor,
elevation: elevation ?? this.elevation,
foregroundStyle: foregroundStyle ?? this.foregroundStyle,
foregroundColor: foregroundColor ?? this.foregroundColor,
foregroundOpacity: foregroundOpacity ?? this.foregroundOpacity,
foregroundAlpha: foregroundAlpha ?? this.foregroundAlpha,
foregroundSpacing: foregroundSpacing ?? this.foregroundSpacing,
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,
);
}