copyWith method
CapsuleConfig
copyWith({
- List<
CapsulePrize> ? prizes, - List<
int> ? capsules, - int? capsulesPerPrize,
- CapsuleOptions? options,
- CapsuleStyle? style,
返回替换非空参数的副本,例如 value.copyWith() 保留全部字段。
Implementation
CapsuleConfig copyWith(
{List<CapsulePrize>? prizes,
List<int>? capsules,
int? capsulesPerPrize,
CapsuleOptions? options,
CapsuleStyle? style}) =>
CapsuleConfig(
prizes: prizes ?? this.prizes,
capsules: capsules ?? this.capsules,
capsulesPerPrize: capsulesPerPrize ?? this.capsulesPerPrize,
options: options ?? this.options,
style: style ?? this.style);