Congratulations on publishing the first version of your Flutter app. You probably landed on this page because you might need to update the app version of your Flutter app. It is very usual that while uploading the next version of your Flutter, we may forget to update the app version and only come to know by a message from the Play Store or app store. So in this tutorial, we’ll learn how you can update app version in Flutter.
Here’s what we’ll cover:
Understanding App Version
Before we change the app version, it is critical to understand what exactly we are going to change and how it affects our app. Basically, the app version can be controlled from the
pubspec.yaml file. There you’ll find the following line:
The 1.0.0 (before + sign) represents the build name. The 1 (after + sign) represents the build number.
The 1.0.0 (before + sign) is used as versionName and 1(after + sign) used as versionCode.
The 1.0.0 (before + sign) is used as CFBundleShortVersionString and 1(after + sign) used as CFBundleVersion.
How to update app version in Flutter
To update the app version in Flutter, you can simply open the
pubspec.yaml file and then update the version tag. Inside the version tag, just increase the build number (for Android) or CFBundleVersion (for iOS).
Here’s how exactly you do it
Step 1: Open the
Step 2: Locate the
Step 3: Update the build name and number such as
Step 4: Open the terminal and hit the
flutter clean command.
Step 5: Build the app.
In this tutorial, we learned how to update the app version in Flutter with practical examples. We first understood what is app version and how it refers to a different name in Android and iOS and then finally saw the step-by-step instruction on updating the app version.
Would you like to check other interesting Flutter tutorials?