withAnsiStyle method

String withAnsiStyle(
  1. AnsiStyle? style
)

Adds an ANSI style to the string.

Implementation

String withAnsiStyle(AnsiStyle? style) {
  if (style == null) return this;
  return style.formatted(this);
}