MetroConsole class
Print messages in the console e.g. MetroConsole.writeInGreen('success');
Constructors
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
-
coloredHyperlink(
String text, String filePath, ConsoleColor color, {bool bold = false}) → String - Creates a colored terminal hyperlink.
-
hyperlink(
String text, String filePath) → String - 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
messagein black. -
writeInBold(
String message) → void -
writes a
messagein bold. -
writeInCyan(
String message) → void -
writes a
messagein cyan. Useful for informational messages. -
writeInGreen(
String message) → void -
writes a
messagein green. -
writeInRed(
String message) → void -
writes a
messagein red. -
writeInYellow(
String message) → void -
writes a
messagein yellow. Useful for warning messages.