AnsiColor class Null safety
Helper class to assist in printing text to the console with a color.
Use one of the color functions instead of this class.
See:
Constructors
Properties
Methods
-
apply(
String text, {AnsiColor background = none}) → String - writes the text to the terminal.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed. [...]
inherited
-
toString(
) → String -
A string representation of this object. [...]
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator. [...]
inherited
Static Methods
Constants
- black → const AnsiColor
-
Colors
black
AnsiColor(codeBlack)
- blue → const AnsiColor
-
blue
AnsiColor(codeBlue)
- codeBlack → const int
-
code for black
30
- codeBlue → const int
-
code for blue
34
- codeCyan → const int
-
code for cyan
36
- codeGreen → const int
-
code for green
32
- codeGrey → const int
-
code for grey
232
- codeMagenta → const int
-
code for magenta
35
- codeOrange → const int
-
code for orange
208
- codeRed → const int
-
code for red
31
- codeWhite → const int
-
code for white
37
- codeYellow → const int
-
code for yellow
33
- cyan → const AnsiColor
-
cyan
AnsiColor(codeCyan)
- green → const AnsiColor
-
green
AnsiColor(codeGreen)
- magenta → const AnsiColor
-
magenta
AnsiColor(codeMagenta)
- none → const AnsiColor
-
passing this as the background color will cause
the background code to be suppressed resulting
in the default background color.
AnsiColor(-1, bold: false)
- orange → const AnsiColor
-
orange
AnsiColor(codeOrange)
- red → const AnsiColor
-
red
AnsiColor(codeRed)
- white → const AnsiColor
-
white
AnsiColor(codeWhite)
- yellow → const AnsiColor
-
yellow
AnsiColor(codeYellow)