Ascii class

A string with escape codes already in it, waiting to be printed.

Mostly a namespace: Ascii.colour and Ascii.format are the palettes, and output is a print that closes the style behind itself.

Ascii('${Ascii.colour.cyan.fg}${Ascii.format.bold}ready').output();

Constructors

Ascii(String string)
Wraps a string that already carries its escape codes.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
string String
The text and codes to print, as given. reset is appended when the string is produced, not here.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
output() String
Prints string closed with reset, and hands back what it printed.
toString() String
string with reset appended, so the style stops at the end of it.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

colour → const AsciiColours
The 256 colours. Same object as the top-level colours.
format → const AsciiFormats
The text styles. Same object as the top-level formats.