copyWith method

  1. @override
GridImage copyWith({
  1. ImageProvider<Object>? image,
  2. LuckyLength? top,
  3. LuckyLength? left,
  4. LuckyLength? width,
  5. LuckyLength? height,
  6. LuckyImageFormatter? formatter,
  7. double? borderRadius,
  8. double? opacity,
  9. ImageProvider<Object>? fallback,
  10. String? semanticLabel,
  11. ImageProvider<Object>? activeImage,
})
override

返回替换非空参数的副本。

Implementation

@override
GridImage copyWith(
        {ImageProvider<Object>? image,
        LuckyLength? top,
        LuckyLength? left,
        LuckyLength? width,
        LuckyLength? height,
        LuckyImageFormatter? formatter,
        double? borderRadius,
        double? opacity,
        ImageProvider<Object>? fallback,
        String? semanticLabel,
        ImageProvider<Object>? activeImage}) =>
    GridImage(image ?? this.image,
        top: top ?? this.top,
        left: left ?? this.left,
        width: width ?? this.width,
        height: height ?? this.height,
        formatter: formatter ?? this.formatter,
        borderRadius: borderRadius ?? this.borderRadius,
        opacity: opacity ?? this.opacity,
        fallback: fallback ?? this.fallback,
        semanticLabel: semanticLabel ?? this.semanticLabel,
        activeImage: activeImage ?? this.activeImage);