runDartScript function

String runDartScript(
  1. String script, {
  2. List<String> arguments = const [],
  3. bool quiet = false,
  4. String? packageRoot,
  5. RunOptions? runOptions,
  6. String? workingDirectory,
})

Run a dart script using run_lib.run. Returns the stdout.

Prefer Dart.run instead.

Implementation

String runDartScript(String script,
    {List<String> arguments = const [],
    bool quiet = false,
    String? packageRoot,
    RunOptions? runOptions,
    String? workingDirectory}) {
  runOptions = mergeWorkingDirectory(workingDirectory, runOptions);
  return Dart.run(script,
      arguments: arguments,
      quiet: quiet,
      packageRoot: packageRoot,
      runOptions: runOptions);
}