version function
Returns the version no. for the pubspec.yaml located
at pubspecPath
.
Use findPubSpec to find the location.
Implementation
Version? version({required String pubspecPath}) {
final pubspec = PubSpec.fromFile(pubspecPath);
return pubspec.version;
}