ConsoleColors class

Utility class for colored console output using ANSI escape codes

Constructors

ConsoleColors.new()

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

colorize(String text, String color) String
Wraps text with a color code and resets style after the text
directory(String text) String
Formats text as a directory name with bold yellow styling
error(String text) String
Formats text as an error message with red styling
file(String text) String
Formats text as a file name with white styling
info(String text) String
Formats text as general information with gray styling
size(String text) String
Formats text as size information with gray styling
success(String text) String
Formats text as a success message with green styling
warning(String text) String
Formats text as a warning message with yellow styling

Constants

black → const String
ANSI escape code for black foreground text
blue → const String
ANSI escape code for blue foreground text
bold → const String
ANSI escape code for bold text style
cyan → const String
ANSI escape code for cyan foreground text
gray → const String
ANSI escape code for gray foreground text
green → const String
ANSI escape code for green foreground text
italic → const String
ANSI escape code for italic text style
magenta → const String
ANSI escape code for magenta foreground text
red → const String
ANSI escape code for red foreground text
reset → const String
ANSI escape code to reset all colors and styles
underline → const String
ANSI escape code for underlined text style
white → const String
ANSI escape code for white foreground text
yellow → const String
ANSI escape code for yellow foreground text