foreground property
int
foreground
Escape sequence value representing this color as foreground color.
import 'dart:io';
void main() {
example(Ansi1BitColors.red, 'Hello World');
}
void example(Ansi1BitColors color, String message) {
stdout.write('\u001b[${color.foreground}m');
stdout.write(message);
}
Implementation
int get foreground => index + _offsetToForegroundColors;