copyWith method
Returns a copy of this style with selected fields updated.
Implementation
UvStyle copyWith({
UvColor? fg,
bool clearFg = false,
UvColor? bg,
bool clearBg = false,
UvColor? underlineColor,
bool clearUnderlineColor = false,
UnderlineStyle? underline,
int? attrs,
}) {
return UvStyle(
fg: clearFg ? null : (fg ?? this.fg),
bg: clearBg ? null : (bg ?? this.bg),
underlineColor: clearUnderlineColor
? null
: (underlineColor ?? this.underlineColor),
underline: underline ?? this.underline,
attrs: attrs ?? this.attrs,
);
}