apply static method

String apply(
  1. AnsiColor color,
  2. String text
)

Applies a foreground color to the given text.

Useful when working with custom color definitions.

Example:

print(AnsiOutput.apply(AnsiColor.UNDERLINE, "underlined"));

Implementation

static String apply(AnsiColor color, String text) => color(text);