AnsiColor class Null safety

Constructors

AnsiColor(int code)
const

Properties

code int
read-only
hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

apply(String text, {AnsiColor bgcolor = none}) String
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

bgReset() String
fgReset() String
grey({double level = 0.5}) AnsiColor
reset() String

Constants

bgColor → const String
emmit this code followed by a color code to set the fg color
'48;5;'
bgResetCode → const String
Defaults the terminal's bg color without altering the fg.
'49'
black → const AnsiColor
Colors
const AnsiColor(30)
blue → const AnsiColor
const AnsiColor(34)
cyan → const AnsiColor
const AnsiColor(36)
esc → const String
ANSI Control Sequence Introducer, signals the terminal for new settings.
'\x1B['
fgColor → const String
emmit this code followed by a color code to set the fg color
'38;5;'
fgResetCode → const String
Defaults the terminal's fg color without altering the bg.
'39'
green → const AnsiColor
const AnsiColor(32)
magenta → const AnsiColor
const AnsiColor(35)
none → const AnsiColor
passing this as the background color will cause the background code to be suppressed resulting in the default background color.
const AnsiColor(-1)
orange → const AnsiColor
const AnsiColor(208)
red → const AnsiColor
const AnsiColor(31)
resetCode → const String
Resets Reset fg and bg colors
'0'
white → const AnsiColor
const AnsiColor(37)
yellow → const AnsiColor
const AnsiColor(33)