-
Notifications
You must be signed in to change notification settings - Fork 42
/
main.dart
25 lines (20 loc) · 853 Bytes
/
main.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import 'package:dart_console/dart_console.dart';
void main() {
final console = Console();
console.setBackgroundColor(ConsoleColor.blue);
console.setForegroundColor(ConsoleColor.white);
console.writeLine('Simple Demo', TextAlignment.center);
console.resetColorAttributes();
console.writeLine();
console.writeLine('This console window has ${console.windowWidth} cols and '
'${console.windowHeight} rows.');
console.writeLine();
console.writeLine('This text is left aligned.', TextAlignment.left);
console.writeLine('This text is center aligned.', TextAlignment.center);
console.writeLine('This text is right aligned.', TextAlignment.right);
for (final color in ConsoleColor.values) {
console.setForegroundColor(color);
console.writeLine(color.toString().split('.').last);
}
console.resetColorAttributes();
}