copyWith method
TextComponentStyle
copyWith({
- AnsiColorType? color,
- AnsiColorType? bgColor,
- Set<
FontStyle> ? styles, - EdgeInsets? padding,
- EdgeInsets? margin,
Returns a new TextComponentStyle with the given properties overridden.
Properties not specified will be copied from the current style.
Implementation
TextComponentStyle copyWith({
AnsiColorType? color,
AnsiColorType? bgColor,
Set<FontStyle>? styles,
EdgeInsets? padding,
EdgeInsets? margin,
}) {
return TextComponentStyle(
color: color ?? this.color,
bgColor: bgColor ?? this.bgColor,
styles: styles ?? this.styles,
padding: padding ?? this.padding,
margin: margin ?? this.margin,
);
}