copyWith method
ImageStyle
copyWith({
- double? width,
- double? height,
- double? maxWidth,
- double? maxHeight,
- double? borderRadius,
- BorderRadiusGeometry? borderRadiusGeometry,
- BoxBorder? border,
- List<
BoxShadow> ? boxShadow, - Color? backgroundColor,
- Color? color,
- BlendMode? colorBlendMode,
- ImageFilter? imageFilter,
- BoxFit? fit,
- Alignment? alignment,
- ImageRepeat? repeat,
- double? opacity,
- Clip? clipBehavior,
- bool? isCircle,
- Color? placeholderColor,
- Color? errorColor,
Implementation
ImageStyle copyWith({
double? width,
double? height,
double? maxWidth,
double? maxHeight,
double? borderRadius,
BorderRadiusGeometry? borderRadiusGeometry,
BoxBorder? border,
List<BoxShadow>? boxShadow,
Color? backgroundColor,
Color? color,
BlendMode? colorBlendMode,
ImageFilter? imageFilter,
BoxFit? fit,
Alignment? alignment,
ImageRepeat? repeat,
double? opacity,
Clip? clipBehavior,
bool? isCircle,
Color? placeholderColor,
Color? errorColor,
}) {
return ImageStyle(
width: width ?? this.width,
height: height ?? this.height,
maxWidth: maxWidth ?? this.maxWidth,
maxHeight: maxHeight ?? this.maxHeight,
borderRadius: borderRadius ?? this.borderRadius,
borderRadiusGeometry: borderRadiusGeometry ?? this.borderRadiusGeometry,
border: border ?? this.border,
boxShadow: boxShadow ?? this.boxShadow,
backgroundColor: backgroundColor ?? this.backgroundColor,
color: color ?? this.color,
colorBlendMode: colorBlendMode ?? this.colorBlendMode,
imageFilter: imageFilter ?? this.imageFilter,
fit: fit ?? this.fit,
alignment: alignment ?? this.alignment,
repeat: repeat ?? this.repeat,
opacity: opacity ?? this.opacity,
clipBehavior: clipBehavior ?? this.clipBehavior,
isCircle: isCircle ?? this.isCircle,
placeholderColor: placeholderColor ?? this.placeholderColor,
errorColor: errorColor ?? this.errorColor,
);
}