getVersion static method
Gets the version name and build number from the pubspec content. @param {String} content The pubspec file content. @returns {{versionName: String, buildNumber: String?}} The version data, or null if not found.
Implementation
static Map<String, String?>? getVersion(String content) {
final match = _versionPattern.firstMatch(content);
if (match != null) {
return {'versionName': match.group(1), 'buildNumber': match.group(2)};
}
return null;
}