copyWith method
返回替换非空参数的副本,例如 style.copyWith(buttonText: '开奖')。
Implementation
LottoStyle copyWith(
{Color? drumColor,
Color? rimColor,
Color? slotColor,
Color? buttonColor,
Color? buttonTextColor,
String? buttonText}) =>
LottoStyle(
drumColor: drumColor ?? this.drumColor,
rimColor: rimColor ?? this.rimColor,
slotColor: slotColor ?? this.slotColor,
buttonColor: buttonColor ?? this.buttonColor,
buttonTextColor: buttonTextColor ?? this.buttonTextColor,
buttonText: buttonText ?? this.buttonText);