isSupported property

bool isSupported

returns true of the terminal supports ansi escape characters.

Implementation

static bool get isSupported => _emitAnsi ??= stdin.supportsAnsiEscapes;
void isSupported=(bool emit)

You can set isSupported to override the detected ansi settings. Dart doesn't do a great job of correctly detecting ansi support so this give a way to override it. If isSupported is true then escape charaters are emmitted If isSupported is false escape characters are not emmited By default the detected setting is used. After setting emitAnsi you can reset back to the default detected by calling resetEmitAnsi.

Implementation

static set isSupported(bool emit) => _emitAnsi = emit;