restorePubspec method
Restore pubspec.yaml from backup file
Implementation
void restorePubspec({String? sourcePath, String? targetPath}) {
try {
File(sourcePath ?? 'pubspec_backup.yaml')
.renameSync(targetPath ?? 'pubspec.yaml');
} catch (exception) {
stderr.writeln("Couldn't restore main pubspec.yaml");
stderr.writeln(exception);
}
}