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
There is a plugin that will help you get the version name and number.
In pubspec.yaml add the package_info package.
dependencies:
package_info: ^0.4.0+13
Update the version number to the current one.
In the file that you need it, add the following import.
import 'package:package_info/package_info.dart';
In your code you can get the app version name and code like this:
PackageInfo packageInfo = await PackageInfo.fromPlatform();
String versionName = packageInfo.version;
String versionCode = packageInfo.buildNumber;