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
const AnsiCode._('black', AnsiCodeType.background, 40, resetAll)
backgroundBlue → const AnsiCode
const AnsiCode._('blue', AnsiCodeType.background, 44, resetAll)
backgroundColors → const List<AnsiCode>
All of the AnsiCode values that represent AnsiCodeType.background.
const [backgroundBlack, backgroundRed, backgroundGreen, backgroundYellow, backgroundBlue, backgroundMagenta, backgroundCyan, backgroundLightGray, backgroundDefault, backgroundDarkGray, backgroundLight…
backgroundCyan → const AnsiCode
const AnsiCode._('cyan', AnsiCodeType.background, 46, resetAll)
backgroundDarkGray → const AnsiCode
const AnsiCode._('dark gray', AnsiCodeType.background, 100, resetAll)
backgroundDefault → const AnsiCode
const AnsiCode._('default', AnsiCodeType.background, 49, resetAll)
backgroundGreen → const AnsiCode
const AnsiCode._('green', AnsiCodeType.background, 42, resetAll)
backgroundLightBlue → const AnsiCode
const AnsiCode._('light blue', AnsiCodeType.background, 104, resetAll)
backgroundLightCyan → const AnsiCode
const AnsiCode._('light cyan', AnsiCodeType.background, 106, resetAll)
backgroundLightGray → const AnsiCode
const AnsiCode._('light gray', AnsiCodeType.background, 47, resetAll)
backgroundLightGreen → const AnsiCode
const AnsiCode._('light green', AnsiCodeType.background, 102, resetAll)
backgroundLightMagenta → const AnsiCode
const AnsiCode._('light magenta', AnsiCodeType.background, 105, resetAll)
backgroundLightRed → const AnsiCode
const AnsiCode._('light red', AnsiCodeType.background, 101, resetAll)
backgroundLightYellow → const AnsiCode
const AnsiCode._('light yellow', AnsiCodeType.background, 103, resetAll)
backgroundMagenta → const AnsiCode
const AnsiCode._('magenta', AnsiCodeType.background, 45, resetAll)
backgroundRed → const AnsiCode
const AnsiCode._('red', AnsiCodeType.background, 41, resetAll)
backgroundWhite → const AnsiCode
const AnsiCode._('white', AnsiCodeType.background, 107, resetAll)
backgroundYellow → const AnsiCode
const AnsiCode._('yellow', AnsiCodeType.background, 43, resetAll)
black → const AnsiCode
const AnsiCode._('black', AnsiCodeType.foreground, 30, resetAll)
blue → const AnsiCode
const AnsiCode._('blue', AnsiCodeType.foreground, 34, resetAll)
cyan → const AnsiCode
const AnsiCode._('cyan', AnsiCodeType.foreground, 36, resetAll)
darkGray → const AnsiCode
const AnsiCode._('dark gray', AnsiCodeType.foreground, 90, resetAll)
defaultForeground → const AnsiCode
const AnsiCode._('default', AnsiCodeType.foreground, 39, resetAll)
foregroundColors → const List<AnsiCode>
All of the AnsiCode values that represent AnsiCodeType.foreground.
const [black, red, green, yellow, blue, magenta, cyan, lightGray, defaultForeground, darkGray, lightRed, lightGreen, lightYellow, lightBlue, lightMagenta, lightCyan, white]
green → const AnsiCode
const AnsiCode._('green', AnsiCodeType.foreground, 32, resetAll)
lightBlue → const AnsiCode
const AnsiCode._('light blue', AnsiCodeType.foreground, 94, resetAll)
lightCyan → const AnsiCode
const AnsiCode._('light cyan', AnsiCodeType.foreground, 96, resetAll)
lightGray → const AnsiCode
const AnsiCode._('light gray', AnsiCodeType.foreground, 37, resetAll)
lightGreen → const AnsiCode
const AnsiCode._('light green', AnsiCodeType.foreground, 92, resetAll)
lightMagenta → const AnsiCode
const AnsiCode._('light magenta', AnsiCodeType.foreground, 95, resetAll)
lightRed → const AnsiCode
const AnsiCode._('light red', AnsiCodeType.foreground, 91, resetAll)
lightYellow → const AnsiCode
const AnsiCode._('light yellow', AnsiCodeType.foreground, 93, resetAll)
magenta → const AnsiCode
const AnsiCode._('magenta', AnsiCodeType.foreground, 35, resetAll)
red → const AnsiCode
const AnsiCode._('red', AnsiCodeType.foreground, 31, resetAll)
resetAll → const AnsiCode
const AnsiCode._('all', AnsiCodeType.reset, 0, null)
const AnsiCode._('blink', AnsiCodeType.reset, 25, null)
resetBold → const AnsiCode
const AnsiCode._('bold', AnsiCodeType.reset, 22, null)
resetCrossedOut → const AnsiCode
const AnsiCode._('crossed out', AnsiCodeType.reset, 29, null)
resetDim → const AnsiCode
const AnsiCode._('dim', AnsiCodeType.reset, 22, null)
resetHidden → const AnsiCode
const AnsiCode._('hidden', AnsiCodeType.reset, 28, null)
resetItalic → const AnsiCode
const AnsiCode._('italic', AnsiCodeType.reset, 23, null)
resetReverse → const AnsiCode
const AnsiCode._('reverse', AnsiCodeType.reset, 27, null)
resetUnderlined → const AnsiCode
const AnsiCode._('underlined', AnsiCodeType.reset, 24, null)
const AnsiCode._('blink', AnsiCodeType.style, 5, resetBlink)
styleBold → const AnsiCode
const AnsiCode._('bold', AnsiCodeType.style, 1, resetBold)
styleCrossedOut → const AnsiCode
Not widely supported.
const AnsiCode._('crossed out', AnsiCodeType.style, 9, resetCrossedOut)
styleDim → const AnsiCode
const AnsiCode._('dim', AnsiCodeType.style, 2, resetDim)
styleHidden → const AnsiCode
Not widely supported.
const AnsiCode._('hidden', AnsiCodeType.style, 8, resetHidden)
styleItalic → const AnsiCode
const AnsiCode._('italic', AnsiCodeType.style, 3, resetItalic)
styleReverse → const AnsiCode
const AnsiCode._('reverse', AnsiCodeType.style, 7, resetReverse)
styles → const List<AnsiCode>
All of the AnsiCode values that represent AnsiCodeType.style.
const [styleBold, styleDim, styleItalic, styleUnderlined, styleBlink, styleReverse, styleHidden, styleCrossedOut]
styleUnderlined → const AnsiCode
const AnsiCode._('underlined', AnsiCodeType.style, 4, resetUnderlined)
white → const AnsiCode
const AnsiCode._('white', AnsiCodeType.foreground, 97, resetAll)
yellow → const AnsiCode
const AnsiCode._('yellow', AnsiCodeType.foreground, 33, resetAll)

Properties

ansiOutputEnabled → bool
Whether formatted ANSI output is enabled for wrapWith and AnsiCode.wrap. [...]
read-only

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. [...]