copyWith method

TextComponentStyle copyWith({
  1. AnsiColorType? color,
  2. AnsiColorType? bgColor,
  3. Set<FontStyle>? styles,
  4. EdgeInsets? padding,
  5. 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,
  );
}