CliPrompter constructor

CliPrompter({
  1. required StringSink out,
  2. CliReadLine? readLine,
  3. bool? interactive,
})

Creates a prompt helper with injectable input and output.

Implementation

CliPrompter({
  required StringSink out,
  CliReadLine? readLine,
  bool? interactive,
}) : _out = out,
     _readLine = readLine ?? stdin.readLineSync,
     _interactive = interactive ?? stdin.hasTerminal;