getVersionString method

String getVersionString(
  1. String version, {
  2. bool shouldUsePatch = false,
})

Implementation

String getVersionString(String version, {bool shouldUsePatch = false}) {
  var versionArray = getVersionArray(version);
  if (shouldUsePatch) {
    return generateVersionString(versionArray);
  }
  if (versionArray.length >= 2) {
    return generateVersionString([versionArray[0], versionArray[1]]);
  }
  return 'AA';
}