Add color to printSeparator

This commit is contained in:
Tobe O 2019-10-09 10:38:44 -04:00
parent c1c13ddf68
commit 1e16276be4

View file

@ -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()));
} }
} }