getDependencies method

Future getDependencies()

Implementation

Future getDependencies() async {
  const String cmd = "dart";

  final res = await Process.run(
    cmd,
    ["pub", "get", "--offline", "--no-precompile"],
    workingDirectory:
        context.buildDirectoryUri.toFilePath(windows: Platform.isWindows),
    runInShell: true,
  );
  if (res.exitCode != 0) {
    print("${res.stdout}");
    throw StateError(
      "'pub get' failed with the following message: ${res.stderr}",
    );
  }
}