copyWith method

SlotConfig copyWith({
  1. List<LuckyBoxBlock>? blocks,
  2. List<SlotPrize>? prizes,
  3. List<SlotReel>? reels,
  4. SlotOptions? options,
  5. SlotStyle? style,
  6. SlotWinPredicate? winPredicate,
  7. List<SlotPayline>? paylines,
  8. SlotPaylinePredicate? paylinePredicate,
})

返回仅替换非 null 参数的副本;例如 value.copyWith() 保留全部配置。

Implementation

SlotConfig copyWith(
        {List<LuckyBoxBlock>? blocks,
        List<SlotPrize>? prizes,
        List<SlotReel>? reels,
        SlotOptions? options,
        SlotStyle? style,
        SlotWinPredicate? winPredicate,
        List<SlotPayline>? paylines,
        SlotPaylinePredicate? paylinePredicate}) =>
    SlotConfig(
        blocks: blocks ?? this.blocks,
        prizes: prizes ?? this.prizes,
        reels: reels ?? this.reels,
        options: options ?? this.options,
        style: style ?? this.style,
        winPredicate: winPredicate ?? this.winPredicate,
        paylines: paylines ?? this.paylines,
        paylinePredicate: paylinePredicate ?? this.paylinePredicate);