header static method

void header(
  1. String title, {
  2. String? subtitle,
})

Display a formatted header

Implementation

static void header(String title, {String? subtitle}) {
  final width = terminalWidth;
  final line = '═' * width;

  stdout.writeln(line);
  stdout.writeln(_centerText(title, width));
  if (subtitle != null) {
    stdout.writeln(_centerText(subtitle, width));
  }
  stdout.writeln(line);
  stdout.writeln('');
}