section static method

void section(
  1. String title, {
  2. String color = 'cyan',
})

Section header for organized logging

Implementation

static void section(String title, {String color = 'cyan'}) {
  if (!_enabled || !kDebugMode) return;

  final colorCode = _getColorCode(color);
  final line = '━' * (title.length + 10);
  if (kDebugMode) {
    print('$_bold$colorCode$line$_reset');
  }
  if (kDebugMode) {
    print('$_bold$colorCode     $title     $_reset');
  }
  if (kDebugMode) {
    print('$_bold$colorCode$line$_reset');
  }
}