I try to get the version of my app and the value is empty from PackageInfo. Please help!
PackageInfo packageInfo =
await PackageInfo.fromPlatform();
print('package info: $packageInfo');
And I try to print PackageInfo in terminal:
PackageInfo(appName: MyApp, buildNumber: 3, version: )
As you see is the version from response empty... I have also tried:
Future getVersion() async {
PackageInfo.fromPlatform().then((PackageInfo packageInfo) {
setState(() {
appName = packageInfo.appName;
version = packageInfo.version;
print('version: $version');
});
});
}