copyWith method

WheelPrize copyWith({
  1. LuckyFill? background,
  2. List<LuckyText>? texts,
  3. List<LuckyImage>? images,
  4. double? weight,
  5. double? sectorWeight,
  6. bool? disabled,
  7. WheelPrizePainter? painter,
  8. String? semanticsLabel,
})

返回仅替换非 null 参数的副本。

Implementation

WheelPrize copyWith(
        {LuckyFill? background,
        List<LuckyText>? texts,
        List<LuckyImage>? images,
        double? weight,
        double? sectorWeight,
        bool? disabled,
        WheelPrizePainter? painter,
        String? semanticsLabel}) =>
    WheelPrize(
        background: background ?? this.background,
        texts: texts ?? this.texts,
        images: images ?? this.images,
        weight: weight ?? this.weight,
        sectorWeight: sectorWeight ?? this.sectorWeight,
        disabled: disabled ?? this.disabled,
        painter: painter ?? this.painter,
        semanticsLabel: semanticsLabel ?? this.semanticsLabel);