copyWith method

RCKImageStyleConfig copyWith({
  1. BoxFit? fit,
  2. double? maxWidth,
  3. double? maxHeight,
  4. double? scale,
  5. double? borderRadius,
})

创建一个新的配置,覆盖当前配置的某些属性

Implementation

RCKImageStyleConfig copyWith({
  BoxFit? fit,
  double? maxWidth,
  double? maxHeight,
  double? scale,
  double? borderRadius,
}) {
  return RCKImageStyleConfig(
    fit: fit ?? this.fit,
    maxWidth: maxWidth ?? this.maxWidth,
    maxHeight: maxHeight ?? this.maxHeight,
    scale: scale ?? this.scale,
    borderRadius: borderRadius ?? this.borderRadius,
  );
}