copyWith method

CapsuleStyle copyWith({
  1. LuckyFill? globeFill,
  2. LuckyFill? bodyFill,
  3. LuckyFill? knobFill,
  4. Color? seamColor,
  5. LuckyCellStyle? card,
  6. LuckyTextDefaults? text,
})

返回替换非空参数的副本,例如 value.copyWith() 保留全部字段。

Implementation

CapsuleStyle copyWith(
        {LuckyFill? globeFill,
        LuckyFill? bodyFill,
        LuckyFill? knobFill,
        Color? seamColor,
        LuckyCellStyle? card,
        LuckyTextDefaults? text}) =>
    CapsuleStyle(
        globeFill: globeFill ?? this.globeFill,
        bodyFill: bodyFill ?? this.bodyFill,
        knobFill: knobFill ?? this.knobFill,
        seamColor: seamColor ?? this.seamColor,
        card: card ?? this.card,
        text: text ?? this.text);