I am currently developing an application which is currently in beta mode. Due to this, I would like to show them what version they are on. For example, "v1.0b10 - iOS". So far, I have got this code: Text("Build: V1.0b10 - " + (Platform.isIOS ? "iOS" : "Android"))
. How would I be able to get the build version and number within flutter?
相关问题
- Android version code for App updating
- Flutter : Prepare list data from http request
- How to schedule an alarm on specific time in Flutt
- Modelica libraries use different MSL version
- MappedListIterable is not a SubType
相关文章
- Observatory server failed to start - Fails to crea
- Flutter error retrieving device properties for ro.
- Adding Shadows at the bottom of a container in flu
- Flutter. Check if a file exists before loading it
- Flutter - http.get fails on macos build target: Co
- Receive share file intents with Flutter
- Do stateless widgets dispose on their own?
- How to clean your build with Flutter RP2 in Androi
You can use package_info.
The versions are extracted from :
Android:
iOS:
Usage
Add the dependency
async
If you don't want to use
away/async
There is a plugin that will help you get the version name and number.
Add the dependency
In pubspec.yaml add the
package_info
package.Update the version number to the current one.
Import the package
In the file that you need it, add the following import.
Get the version name and code
In your code you can get the app version name and code like this:
See also