version function

Version? version({
  1. required String pubspecPath,
})

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;
}