setStyle method

void setStyle(
  1. Style style
)

Apply style to this cell. Merges with existing colors and modifiers.

Implementation

void setStyle(Style style) {
  if (style.fg != null) {
    fg = style.fg!;
    fgRgb = style.fgRgb;
    fgIndexed = style.fgIndexed;
  }
  if (style.bg != null) {
    bg = style.bg!;
    bgRgb = style.bgRgb;
    bgIndexed = style.bgIndexed;
  }
  modifier = modifier.union(style.addModifier).difference(style.subModifier);
}