mirror of
https://github.com/we-promise/sure.git
synced 2026-04-07 14:31:25 +00:00
Add build ID to Flutter app version display
This commit is contained in:
@@ -31,7 +31,11 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
||||
Future<void> _loadAppVersion() async {
|
||||
final packageInfo = await PackageInfo.fromPlatform();
|
||||
if (mounted) {
|
||||
setState(() => _appVersion = packageInfo.version);
|
||||
final build = packageInfo.buildNumber;
|
||||
final display = build.isNotEmpty
|
||||
? '${packageInfo.version} (${build})'
|
||||
: packageInfo.version;
|
||||
setState(() => _appVersion = display);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user