bottomLine static method

String bottomLine(
  1. int length, {
  2. String lineSymbol = '─',
  3. bool withCorner = false,
})

Generates a bottom border line of length repeated lineSymbols.

ConsoleUtils.bottomLine(5);                    // ─────
ConsoleUtils.bottomLine(5, withCorner: true);  // └─────

Implementation

static String bottomLine(
  int length, {
  String lineSymbol = '─',
  bool withCorner = false,
}) {
  assert(length > 0, 'Line length must be greater than zero.');
  final line = lineSymbol * length;
  return withCorner ? '└$line' : line;
}