Ansi class final
Class representing Ansi modifiers.
Used to print custom fonts and colorized output to Ansi compliant terminals.
Constructors
-
Ansi.combine(Set<
Ansi> modifiers) -
Factory constructor combining several Ansi modifiers.
factory
- Ansi.cursorBack([int n = 1])
-
Write Ansi.cursorBack to stdout to move the
cursor back.
const
- Ansi.cursorDown([int n = 1])
-
Write Ansi.cursorDown to stdout to move the
cursor down.
const
- Ansi.cursorForward([int n = 1])
-
Write Ansi.cursorForward to stdout to move the
cursor forward.
const
- Ansi.cursorNextLine([int n = 1])
-
Write Ansi.cursorNextLine to stdout to move the
cursor to the next line.
const
- Ansi.cursorPreviousLine([int n = 1])
-
Write
Ansi.cursorPreviousLine()
to stdout to move the cursor to the beginning of the previous line.const - Ansi.cursorToColumn(int n)
-
Write Ansi.cursorToColumn to stdout to move the
cursor to the column
n
.const - Ansi.cursorUp([int n = 1])
-
Write Ansi.cursorUp to stdout to move the
cursor up.
const
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator +(
Ansi other) → Ansi - Creates a new Ansi object by joining the bare Ansi codes separated by a semicolon character.
-
operator ==(
Object other) → bool -
Returns
true
ifother
is of type Ansi andbareCode == other.bareCode
. Returnsfalse
otherwise.override
Static Properties
- status ↔ AnsiOutput
-
Set status to
false
to globally disable Ansi styling. By default status istrue
.getter/setter pair
Constants
- black → const Ansi
- Ansi color modifier: black foreground.
- blackBg → const Ansi
- Ansi color modifier: black background
- blue → const Ansi
- Ansi color modifier: blue foreground.
- blueBg → const Ansi
- Ansi color modifier: blue background
- blueBright → const Ansi
- Ansi color modifier: bright blue foreground.
- bold → const Ansi
- Ansi modifier bold foreground text.
- crossedOut → const Ansi
- Ansi modifier crossed out foreground text.
- cyan → const Ansi
- Ansi color modifier: cyan foreground.
- cyanBg → const Ansi
- Ansi color modifier: cyan background
- cyanBold → const Ansi
- Ansi color modifier: cyan bold text.
- defaultBg → const Ansi
- Ansi color modifier: default background colour.
- defaultFg → const Ansi
- Ansi color modifier: default foreground colour.
- defaultFont → const Ansi
- Ansi modifier default font.
- defaultIntensity → const Ansi
- Ansi modifier default intensity.
- faint → const Ansi
- Ansi modifier faint foreground text.
- green → const Ansi
- Ansi color modifier: green foreground.
- greenBg → const Ansi
- Ansi color modifier: green background
- greenBright → const Ansi
- Ansi color modifier: bright green foreground.
- grey → const Ansi
- Ansi color modifier: grey foreground
- greyBold → const Ansi
- Ansi color modifier: grey bold foreground
- italic → const Ansi
- Ansi modifier italic foreground text.
- magenta → const Ansi
- Ansi color modifier: magenta foreground.
- magentaBg → const Ansi
- Ansi color modifier: magenta background
- magentaBold → const Ansi
- Ansi color modifier: magenta bold foreground.
- magentaBright → const Ansi
- Ansi color modifier: bright magenta foreground.
- red → const Ansi
- Ansi color modifier: red foreground.
- redBg → const Ansi
- Ansi color modifier: red backgroound
- redBright → const Ansi
- Ansi color modifier: bright red foreground.
- reset → const Ansi
- Ansi modifier: Reset to default.
- underline → const Ansi
- Ansi mofifiers underlined foreground text.
- whiteBg → const Ansi
- Ansi color modifier: white background
- whiteBold → const Ansi
- Ansi color modifier: white bold foreground
- yellow → const Ansi
- Ansi color modifier: yellow foreground.
- yellowBg → const Ansi
- Ansi color modifier: yellow background
- yellowBright → const Ansi
- Ansi color modifier: bright yellow foreground.