copyWith method

LotsStick copyWith({
  1. String? label,
  2. List<LuckyText>? texts,
  3. List<LuckyImage>? images,
  4. LuckyFill? fill,
  5. double? weight,
  6. bool? disabled,
  7. LotsStickPainter? painter,
})

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

Implementation

LotsStick copyWith(
        {String? label,
        List<LuckyText>? texts,
        List<LuckyImage>? images,
        LuckyFill? fill,
        double? weight,
        bool? disabled,
        LotsStickPainter? painter}) =>
    LotsStick(
        label: label ?? this.label,
        texts: texts ?? this.texts,
        images: images ?? this.images,
        fill: fill ?? this.fill,
        weight: weight ?? this.weight,
        disabled: disabled ?? this.disabled,
        painter: painter ?? this.painter);