addPackageByFileScriptDart method

FutureOr<File> addPackageByFileScriptDart({
  1. required File fileScriptDart,
  2. required List<String> new_packages,
})

Implementation

FutureOr<File> addPackageByFileScriptDart({
  required File fileScriptDart,
  required List<String> new_packages,
}) async {
  String scriptDart = await fileScriptDart.readAsString();
  return await fileScriptDart.writeAsString(addPackageByStringScriptDart(
    scriptDart: scriptDart,
    new_packages: new_packages,
  ));
}