Skip to content
DeveloperMemos

Upgrading Flutter App Version for Play Store Release

Flutter, Play Store, Versioning1 min read

When releasing an update to your Flutter app on the Google Play Store, it's crucial to properly upgrade the version code and name. This guide walks you through the steps to ensure your app's new version is accepted by the Play Store.

Understanding Version Code and Version Name

In Flutter, the app version is defined in the pubspec.yaml file. The version format is X.Y.Z+n, where:

  • X.Y.Z represents the version name (e.g., 1.2.0).
  • n represents the version code, which is an integer (e.g., 3).

Every new release should have a unique version code.

Steps to Upgrade Your App Version

1. Update pubspec.yaml

Locate the version line in your pubspec.yaml file and update it. For example:

1version: 1.2.1+4

2. Run flutter pub get

After updating the pubspec.yaml, run the following command in your terminal:

1flutter pub get

This updates your local properties with the new version information.

3. Build Your App

Build your APK or App Bundle with one of the following commands:

  • For APK:
1flutter build apk
  • For App Bundle:
1flutter build appbundle

4. Verify the Version

After building your app, verify the version code and name in the build output or by inspecting the APK or App Bundle.

Additional Tips

  • Always increment the version code for each release.
  • Keep your version name in sync with new features or fixes.
  • Remember to test your app thoroughly before submitting it to the Play Store.