MetroConsole class

Print messages in the console e.g. MetroConsole.writeInGreen('success');

Constructors

MetroConsole()

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

Creates a colored terminal hyperlink.
Creates a terminal hyperlink using OSC 8 escape sequence. Supported by VS Code, Cursor, iTerm2, GNOME Terminal, Windows Terminal, etc. Falls back to plain text in terminals that don't support it.
reset() → void
Resets any active console styling.
write(String message, {ConsoleColor? color, bool bold = false, bool newLine = true}) → void
Flexible write method with optional color, style, and newline control.
writeInBlack(String message) → void
writes a message in black.
writeInBold(String message) → void
writes a message in bold.
writeInCyan(String message) → void
writes a message in cyan. Useful for informational messages.
writeInGreen(String message) → void
writes a message in green.
writeInRed(String message) → void
writes a message in red.
writeInYellow(String message) → void
writes a message in yellow. Useful for warning messages.