ConsoleStyle class

Representation of a style for outputting to a Console in different colors with differing attributes.

A few suggested default styles are provided.

Constructors

ConsoleStyle.new({ConsoleColor? color, ConsoleColor? background, bool bold = false})
const

Properties

background ConsoleColor?
Optional background color, if null, background is plain.
final
bold bool
If true, text is bold.
final
color ConsoleColor?
Optional text color, if null, text is plain.
final
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

Constants

error → const ConsoleStyle
Red text with no background.
info → const ConsoleStyle
Light blue text with no background.
plain → const ConsoleStyle
Plain text with no color or background.
success → const ConsoleStyle
Green text with no background.
warning → const ConsoleStyle
Yellow text with no background.