copyWith method

LottoConfig copyWith({
  1. List<LottoPool>? pools,
  2. LottoOptions? options,
  3. LottoStyle? style,
})

返回替换非空参数的副本,例如 config.copyWith(style: style)。

Implementation

LottoConfig copyWith(
        {List<LottoPool>? pools, LottoOptions? options, LottoStyle? style}) =>
    LottoConfig(
        pools: pools ?? this.pools,
        options: options ?? this.options,
        style: style ?? this.style);