getAppVersion function
Get the version of the application
Implementation
String getAppVersion() {
final executablePath = Platform.script.toFilePath();
String path = p.join(executablePath, '..', '..', 'pubspec.yaml');
path = p.normalize(path);
try {
final pubspec = PubspecService().parse(path);
return pubspec.version.toString();
} on Exception catch (_) {
return CliStrings.version;
}
}