inputLine method

void inputLine(
  1. String text, {
  2. bool showCursor = true,
  3. String? placeholder,
})

Writes an input line with cursor: │ ▶ cursor

Implementation

void inputLine(String text, {bool showCursor = true, String? placeholder}) {
  final display = text.isEmpty && placeholder != null
      ? '${theme.dim}$placeholder${theme.reset}'
      : text;
  final cursor = showCursor ? '${theme.accent}▌${theme.reset}' : '';
  gutterLine('${lb.arrowAccent()} $display$cursor');
}