getVersionForDisplay static method

Future<String> getVersionForDisplay()

Get the app version for display purposes.

Returns environment-appropriate version info:

  • Production: simple version (e.g., "1.0.0")
  • Other environments: full build info (e.g., "1.0.0+42_main_abc1234")

Useful for showing version in UI where developers need detailed build info during development, but users only need the version.

Implementation

static Future<String> getVersionForDisplay() async {
  if (environmentType == EnvironmentType.production) {
    return await getVersion();
  }
  return await getBuildInfo();
}