copyWith method

LottoPool copyWith({
  1. int? min,
  2. int? max,
  3. int? count,
  4. LuckyFill? ballFill,
  5. Color? textColor,
  6. String? label,
})

返回替换非空参数的副本;例如 pool.copyWith(count: 1)。

Implementation

LottoPool copyWith(
        {int? min,
        int? max,
        int? count,
        LuckyFill? ballFill,
        Color? textColor,
        String? label}) =>
    LottoPool(
        min: min ?? this.min,
        max: max ?? this.max,
        count: count ?? this.count,
        ballFill: ballFill ?? this.ballFill,
        textColor: textColor ?? this.textColor,
        label: label ?? this.label);