AnsiColor class sealed

ANSI颜色和样式控制类,用于控制台输出的丰富格式化

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

get256BgColor(int code) String
get256Color(int code) String
wrap(String text, String color, {String? bgColor, String? style}) String
将文本用指定的颜色包裹
wrapMultiline(String text, String color, {String? bgColor, String? style}) String
多行文本着色,主要是处理如stack这种多行文本问题

Constants

bgBlack → const String
背景色 - 基本颜色
bgBlue → const String
bgBrightBlack → const String
背景色 - 亮色
bgBrightBlue → const String
bgBrightCyan → const String
bgBrightGreen → const String
bgBrightMagenta → const String
bgBrightRed → const String
bgBrightWhite → const String
bgBrightYellow → const String
bgCyan → const String
bgGreen → const String
bgMagenta → const String
bgRed → const String
bgWhite → const String
bgYellow → const String
black → const String
前景色 - 基本颜色
blue → const String
bold → const String
样式
brightBlack → const String
前景色 - 亮色
brightBlue → const String
brightCyan → const String
brightGreen → const String
brightMagenta → const String
brightRed → const String
brightWhite → const String
brightYellow → const String
cyan → const String
dim → const String
green → const String
hidden → const String
italic → const String
magenta → const String
red → const String
reset → const String
重置所有样式
reverse → const String
strikethrough → const String
underline → const String
white → const String
yellow → const String