copyWith method
ImageSpec
copyWith({
- ImageProvider<
Object> ? image, - double? width,
- double? height,
- Color? color,
- ImageRepeat? repeat,
- BoxFit? fit,
- AlignmentGeometry? alignment,
- Rect? centerSlice,
- FilterQuality? filterQuality,
- BlendMode? colorBlendMode,
- AnimatedData? animated,
override
Creates a copy of this spec with the given fields replaced by the non-null parameter values.
Implementation
@override
ImageSpec copyWith({
ImageProvider? image,
double? width,
double? height,
Color? color,
ImageRepeat? repeat,
BoxFit? fit,
AlignmentGeometry? alignment,
Rect? centerSlice,
FilterQuality? filterQuality,
BlendMode? colorBlendMode,
AnimatedData? animated,
}) {
return ImageSpec(
width: width ?? this.width,
height: height ?? this.height,
color: color ?? this.color,
repeat: repeat ?? this.repeat,
fit: fit ?? this.fit,
alignment: alignment ?? this.alignment,
centerSlice: centerSlice ?? this.centerSlice,
filterQuality: filterQuality ?? this.filterQuality,
colorBlendMode: colorBlendMode ?? this.colorBlendMode,
animated: animated ?? this.animated,
);
}