copyWith method
SlotConfig
copyWith({
- List<
LuckyBoxBlock> ? blocks, - List<
SlotPrize> ? prizes, - List<
SlotReel> ? reels, - SlotOptions? options,
- SlotStyle? style,
- SlotWinPredicate? winPredicate,
- List<
SlotPayline> ? paylines, - 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);