deletePubspec method

void deletePubspec({
  1. required String targetPath,
})

Delete specified file

Implementation

void deletePubspec({required String targetPath}) {
  try {
    File(targetPath).deleteSync();
  } catch (exception) {
    stderr.writeln("Couldn't restore main pubspec.yaml");
    stderr.writeln(exception);
  }
}