Flutter: Update App Version

When you upload the next version to playstore or app store. The platform give you a message the you need to update the app version. Here you will learn exactly how you can change the app version in flutter.

Flutter give developer ability to change the app version from a single place.

For that you have to follow these easy steps.

Step 1: Open pubspec.yaml

pubspec.yaml is a place where you manage packages and versioning of your app. Open the pubspen.yaml file.

pubspec.yaml

Step 2: Change Version

You have to find the version here and change it here.

Before

version: 1.0.0+1

After

version: 1.0.2+2

Step 3: Clean Flutter Project

Open terminal and run command mention bellow. This will delete the old files..

flutter clean

Step 4: Again Build the project

Now, a fresh app build will be created with the correct version that we have set above.

ege. Example: For Android

flutter build appbundle

Note: Of course you set up other settings for this project according to these instructions docs.

Explanation

Flutter update app number

Flutter version number is divided into

We can override the version number with build name and builder number with the build number by overriding the values in pubspec.yaml file.

1.0.0Build Name
1Build Number
Default App Version

Android

In android,

Build Name is used as Version Name.

Build Number is used as Version Code.

For more info visit this official android link.

IOS

In IOS,

Build Name is used as CFBundleShortVersionString

build-number is used as CFBundleVersion.

Further explanation can be found in the official docs.

Windows

In windows,

Build Name is used as major, minor, patch parts and file version.

Build Number is used as the build suffix.

Conclusion

Remember you have to change the version from version: 1.0.0+1 to version: 1.0.2+2 if you want to upload the second update. And from version: 1.0.2+2 to version: 1.0.3+3 if you want to upload third update of your app.

Read more:

Hope you like this flutter tutorial. Thanks.

Hussain Humdani

Hussain Humdani

while ( ! ( succeed = try() ) );