Add color to printSeparator
This commit is contained in:
parent
c1c13ddf68
commit
1e16276be4
1 changed files with 4 additions and 3 deletions
|
@ -1,11 +1,12 @@
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
import 'package:io/ansi.dart';
|
||||||
|
|
||||||
void printSeparator(String title) {
|
void printSeparator(String title) {
|
||||||
var b = StringBuffer(title.toUpperCase());
|
var b = StringBuffer('===' + title.toUpperCase());
|
||||||
for (int i = b.length; i < stdout.terminalColumns; i++) {
|
for (int i = b.length; i < stdout.terminalColumns - 3; i++) {
|
||||||
b.write('=');
|
b.write('=');
|
||||||
}
|
}
|
||||||
for (int i = 0; i < 3; i++) {
|
for (int i = 0; i < 3; i++) {
|
||||||
print(b);
|
print(magenta.wrap(b.toString()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue