setShell method

dynamic setShell(
  1. dynamic live,
  2. dynamic resetOutput
)

Implementation

setShell(live, resetOutput) {
  if (resetOutput) {
    output = [];
    errorOutput = [];
    debugPrint("Resetting output");
  }
  if (live) {
    shell = Shell(stdout: controller.sink, verbose: false, runInShell: true);
    status = ShellStatus.running;
  } else {
    shell = Shell();
    shell.kill();
    shell = Shell(verbose: false, runInShell: true);
  }
}