How to update app version - Android & Flutter

2020-07-26 2 min read

It's easy to update the version of an app developed with Flutter, but it may confuse you at first glance.

If the version of your app is something like 1.0.0+1, then you should know that the first three numbers separated by dots are the version number of your app. The latter part separated by a + is the build number.

Differences between version numbers and build numbers

  1 . 0 . 0      +        1           -> VALUES
version number        build number    -> FLUTTER TERMS
 versionName          versionCode     -> CORRESPONDING ANDROID TERMS

While the version number (or versionName) is a string and visible to your users, the build number (or versionCode) is a positive integer value used to determine whether one version is more recent than another.

That being said, you should increase the build number with each release as higher numbers indicate more recent versions. The version number can be any string, it's up to you. Just remember to increase the build number with each release.

Update the version number of a Flutter application

Open the pubspec.yaml file and update the line version: 1.0.0+1. After updating it, run flutter pub get. This updates the versionName and the versionCode in the local.properties file, which are later updated in the build.gradle file when you rebuild the Flutter app.

Date: 2020-07-26
Categories: development