boxSummary static method
Draw a boxed summary
Implementation
static void boxSummary(String title, List<String> lines) {
if (lines.isEmpty) return;
final width =
lines.map((l) => l.length).reduce((a, b) => a > b ? a : b) + 4;
final top = '┌─ $title ${'─' * (width - title.length - 2)}┐';
final bottom = '└${'─' * (width + 1)}┘';
print('');
print(chalk.green(top));
for (final line in lines) {
print(chalk.green('│ ${line.padRight(width - 1)}│'));
}
print(chalk.green(bottom));
print('');
}