Fixed version not showing in info screen

This commit is contained in:
JHubi1 2024-09-07 23:15:57 +02:00
parent b1c11ba21f
commit 43d085ae8e
No known key found for this signature in database
GPG Key ID: 7BF82570CBBBD050
1 changed files with 10 additions and 0 deletions

View File

@ -10,6 +10,7 @@ import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import 'package:bitsdojo_window/bitsdojo_window.dart';
import 'package:simple_icons/simple_icons.dart';
import 'package:url_launcher/url_launcher.dart';
import 'package:package_info_plus/package_info_plus.dart';
import 'package:version/version.dart';
class ScreenSettingsAbout extends StatefulWidget {
@ -26,6 +27,15 @@ class _ScreenSettingsAboutState extends State<ScreenSettingsAbout> {
WidgetsFlutterBinding.ensureInitialized();
updatesSupported(setState, true);
setState(() {});
void setCurrentVersion(Function setState) async {
currentVersion = (await PackageInfo.fromPlatform()).version;
setState(() {});
}
if (currentVersion == null) {
setCurrentVersion(setState);
}
}
@override