getVersionFromPubspec function

Future<String> getVersionFromPubspec()

Implementation

Future<String> getVersionFromPubspec() async {
  final f = File(getBundledFile('pubspec.yaml'));
  final yaml = loadYaml(await f.readAsString()) as Map;
  return yaml['version'] as String;
}