copyWith method

ImageStyle copyWith({
  1. Radius? borderRadius,
  2. EdgeInsetsGeometry? padding,
  3. BoxFit? fit,
  4. double? maxWidth,
  5. double? maxHeight,
})

A copy with the given fields replaced.

Implementation

ImageStyle copyWith({
  Radius? borderRadius,
  EdgeInsetsGeometry? padding,
  BoxFit? fit,
  double? maxWidth,
  double? maxHeight,
}) {
  return ImageStyle(
    borderRadius: borderRadius ?? this.borderRadius,
    padding: padding ?? this.padding,
    fit: fit ?? this.fit,
    maxWidth: maxWidth ?? this.maxWidth,
    maxHeight: maxHeight ?? this.maxHeight,
  );
}