copyWith method
WheelStyle
copyWith({
- LuckyFill? background,
- LuckyTextDefaults? text,
- bool clearBackground = false,
替换非 null 字段;clearBackground 显式清除背景。
Implementation
WheelStyle copyWith(
{LuckyFill? background,
LuckyTextDefaults? text,
bool clearBackground = false}) =>
WheelStyle(
background: clearBackground ? null : background ?? this.background,
text: text ?? this.text);