InlineCommander constructor

InlineCommander({
  1. ThemeData? theme,
  2. Terminal? terminal,
  3. IOSink? sink,
  4. bool allowNonInteractive = false,
})

Creates a new commander.

theme applies to every interactive prompt issued through this commander. terminal is mainly used by tests to inject a TestTerminal; production callers should leave it null. sink overrides the destination of status helpers (default: stdout). allowNonInteractive disables the TTY guard in runTerminal — only enable for testing.

Implementation

InlineCommander({
  ThemeData? theme,
  Terminal? terminal,
  IOSink? sink,
  bool allowNonInteractive = false,
})  : _theme = theme,
      _terminalOverride = terminal,
      _sink = sink,
      _allowNonInteractive = allowNonInteractive;