ansi library

Classes

AnsiCode
Standard ANSI escape code for customizing terminal text output.
AnsiCodeType
The type of code represented by AnsiCode.

Constants

backgroundBlack → const AnsiCode
backgroundBlue → const AnsiCode
backgroundColors → const List<AnsiCode>
All of the AnsiCode values that represent AnsiCodeType.background.
backgroundCyan → const AnsiCode
backgroundDarkGray → const AnsiCode
backgroundDefault → const AnsiCode
backgroundGreen → const AnsiCode
backgroundLightBlue → const AnsiCode
backgroundLightCyan → const AnsiCode
backgroundLightGray → const AnsiCode
backgroundLightGreen → const AnsiCode
backgroundLightMagenta → const AnsiCode
backgroundLightRed → const AnsiCode
backgroundLightYellow → const AnsiCode
backgroundMagenta → const AnsiCode
backgroundRed → const AnsiCode
backgroundWhite → const AnsiCode
backgroundYellow → const AnsiCode
black → const AnsiCode
blue → const AnsiCode
cyan → const AnsiCode
darkGray → const AnsiCode
defaultForeground → const AnsiCode
foregroundColors → const List<AnsiCode>
All of the AnsiCode values that represent AnsiCodeType.foreground.
green → const AnsiCode
lightBlue → const AnsiCode
lightCyan → const AnsiCode
lightGray → const AnsiCode
lightGreen → const AnsiCode
lightMagenta → const AnsiCode
lightRed → const AnsiCode
lightYellow → const AnsiCode
magenta → const AnsiCode
red → const AnsiCode
resetAll → const AnsiCode
resetBold → const AnsiCode
resetCrossedOut → const AnsiCode
resetDim → const AnsiCode
resetHidden → const AnsiCode
resetItalic → const AnsiCode
resetReverse → const AnsiCode
resetUnderlined → const AnsiCode
styleBold → const AnsiCode
styleCrossedOut → const AnsiCode
Not widely supported.
styleDim → const AnsiCode
styleHidden → const AnsiCode
Not widely supported.
styleItalic → const AnsiCode
styleReverse → const AnsiCode
styles → const List<AnsiCode>
All of the AnsiCode values that represent AnsiCodeType.style.
styleUnderlined → const AnsiCode
white → const AnsiCode
yellow → const AnsiCode

Properties

ansiOutputEnabled bool
Whether formatted ANSI output is enabled for wrapWith and AnsiCode.wrap.
no setter

Functions

overrideAnsiOutput<T>(bool enableAnsiOutput, T body()) → T
Allows overriding ansiOutputEnabled to enableAnsiOutput for the code run within body.
wrapWith(String? value, Iterable<AnsiCode> codes, {bool forScript = false}) String?
Returns a String formatted with codes.