AnsiPen class Null safety
Pen attributes for foreground and background colors.
Use the pen in string interpolation to output ansi codes. Use up in string interpolation to globally reset colors.
Constructors
- AnsiPen()
Properties
Methods
-
black(
{bool bg = false, bool bold = false}) → void -
blue(
{bool bg = false, bool bold = false}) → void -
call(
Object msg) → String -
Treat a pen instance as a function such that
pen('msg')
is the same aspen.write('msg')
. -
cyan(
{bool bg = false, bool bold = false}) → void -
gray(
{num level = 1.0, bool bg = false}) → void - Sets the pen color to a grey scale value between 0.0 and 1.0.
-
green(
{bool bg = false, bool bold = false}) → void -
magenta(
{bool bg = false, bool bold = false}) → void -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited
-
red(
{bool bg = false, bool bold = false}) → void -
reset(
) → void - Resets the pen's attributes.
-
rgb(
{num r = 1.0, num g = 1.0, num b = 1.0, bool bg = false}) → void - Sets the pen color to the rgb value between 0.0..1.0.
-
toString(
) → String -
Allow pen colors to be used in a string.
override
-
white(
{bool bg = false, bool bold = false}) → void -
write(
Object msg) → String -
Write the
msg.toString()
with the pen's current settings and then reset all attributes. -
xterm(
int color, {bool bg = false}) → void - Directly index the xterm 256 color palette.
-
yellow(
{bool bg = false, bool bold = false}) → void
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited