MockTerminal constructor

MockTerminal({
  1. int columns = 80,
  2. int rows = 24,
  3. bool interactive = true,
})

Creates a terminal columns wide and rows tall.

Set interactive to false to act like piped input, so prompts ask in PromptMode.line and read the queued lines.

Implementation

MockTerminal({this.columns = 80, this.rows = 24, bool interactive = true})
  : hasInput = interactive,
    hasOutput = interactive,
    supportsAnsi = interactive;