save method
Saves this PubSpec to a pubspec.yaml at the given
path
.
The path
must be a directory not a file name.
Implementation
void save(String path) {
// ignore: discarded_futures
waitForEx<dynamic>(pubspec.save(Directory(dirname(path))));
}