AnsiCode class

A utility class that provides ANSI escape codes for terminal text styling.

This class contains static constants for various ANSI codes that can be used to style text output in terminal environments that support ANSI escape sequences. It includes codes for text styles, foreground colors, background colors, and more.

Constructors

AnsiCode()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent 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

getColorByCode(String color) String?
Returns the ANSI code for a given color name.

Constants

bgBlack → const String
Black background color
bgBlue → const String
Blue background color
bgBrightBlack → const String
Bright black (gray) background color
bgBrightBlue → const String
Bright blue background color
bgBrightCyan → const String
Bright cyan background color
bgBrightGreen → const String
Bright green background color
bgBrightMagenta → const String
Bright magenta background color
bgBrightRed → const String
Bright red background color
bgBrightWhite → const String
Bright white background color
bgBrightYellow → const String
Bright yellow background color
bgCyan → const String
Cyan background color
bgGreen → const String
Green background color
bgMagenta → const String
Magenta background color
bgRed → const String
Red background color
bgWhite → const String
White background color
bgYellow → const String
Yellow background color
black → const String
Black text color
blue → const String
Blue text color
bold → const String
Bold text style
brightBlack → const String
Bright black (gray) text color
brightBlue → const String
Bright blue text color
brightCyan → const String
Bright cyan text color
brightGreen → const String
Bright green text color
brightMagenta → const String
Bright magenta text color
brightRed → const String
Bright red text color
brightWhite → const String
Bright white text color
brightYellow → const String
Bright yellow text color
cyan → const String
Cyan text color
dim → const String
Dimmed text style
green → const String
Green text color
italic → const String
Italic text style
magenta → const String
Magenta text color
normal → const String
Reset to normal style
red → const String
Red text color
reset → const String
Reset all styles and colors to default
underline → const String
Underlined text style
white → const String
White text color
yellow → const String
Yellow text color