Why Show Your App Version?
Displaying your app's version number is super helpful! It makes it easier for customer support to help users and is great for you when testing different builds you downloaded from app stores.
Get the Right Tool
To get the app version info, you need a specific plugin. You'll want to install the package_info_plus
plugin.
How to Get the Version in Code
This plugin lets you access details about your app package.
Using package_info_plus
You can write a simple function, often an async
one, to fetch the package info. This info includes the app version and build number.
Displaying the Version
Once you have the package info, you can display the version and build number anywhere in your app, like in a settings page or at the bottom of a legal section, similar to the example shown in the image. Using a FutureBuilder
is a clean way to handle waiting for the package info to load.