flutter get app version code example
Example 1: how to check flutter version
flutter --version
Example 2: flutter access version number
PackageInfo packageInfo = await PackageInfo.fromPlatform();
String appName = packageInfo.appName;
String packageName = packageInfo.packageName;
String version = packageInfo.version;
String buildNumber = packageInfo.buildNumber;