runWithImmediatePrint method Null safety

  1. @protected
Future<ProcessResult> runWithImmediatePrint(
  1. String executable,
  2. List<String> arguments,
  3. {bool printStdOut = true,
  4. bool printErrOut = true,
  5. String? workingDir}
)

Implementation

@protected
Future<ProcessResult> runWithImmediatePrint(
    String executable, List<String> arguments,
    {bool printStdOut = true, bool printErrOut = true, String? workingDir}) {
  return runAndListenOutput(
    executable,
    arguments,
    onOut: printStdOut ? (out) => printInfo(out.trimEndLine()) : null,
    onErr: printErrOut ? (err) => printError(err.trimEndLine()) : null,
    workingDir: workingDir,
  );
}