getReleaseId static method

Future<String> getReleaseId()

Get a unique release identifier including app name.

Format: appName@version+build with optional git/date info:

  • "my-app@1.0.0+42" (no git info)
  • "my-app@1.0.0+42_main_abc1234_20251225-1420" (branch + commit + date)
  • "my-app@1.0.0+42_tag-v1.0.0_20251225-1420" (tag build)

Useful for error reporting (Sentry, Crashlytics), logging, and anywhere a unique build identifier is needed.

Implementation

static Future<String> getReleaseId() async {
  final info = await getPackageInfo();
  final base = '${info.appName}@${info.version}+${info.buildNumber}';
  return _appendGitInfo(base);
}