update version

This commit is contained in:
zach 2026-01-02 14:50:11 -07:00
parent ad911a1d80
commit cd9f14dd09
3 changed files with 24 additions and 8 deletions

View file

@ -1,5 +1,6 @@
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:package_info_plus/package_info_plus.dart';
import '../connector/meshcore_connector.dart';
import '../connector/meshcore_protocol.dart';
@ -17,6 +18,20 @@ class SettingsScreen extends StatefulWidget {
class _SettingsScreenState extends State<SettingsScreen> {
bool _showBatteryVoltage = false;
String _appVersion = '...';
@override
void initState() {
super.initState();
_loadVersionInfo();
}
Future<void> _loadVersionInfo() async {
final packageInfo = await PackageInfo.fromPlatform();
setState(() {
_appVersion = packageInfo.version;
});
}
@override
Widget build(BuildContext context) {
@ -240,7 +255,7 @@ class _SettingsScreenState extends State<SettingsScreen> {
child: ListTile(
leading: const Icon(Icons.info_outline),
title: const Text('About'),
subtitle: const Text('MeshCore Open v0.1.0'),
subtitle: Text('MeshCore Open v$_appVersion'),
onTap: () => _showAbout(context),
),
);
@ -533,7 +548,7 @@ class _SettingsScreenState extends State<SettingsScreen> {
showAboutDialog(
context: context,
applicationName: 'MeshCore Open',
applicationVersion: '0.1.0',
applicationVersion: _appVersion,
applicationLegalese: '2024 MeshCore Open Source Project',
children: [
const SizedBox(height: 16),

View file

@ -465,13 +465,13 @@ packages:
source: hosted
version: "2.1.0"
package_info_plus:
dependency: transitive
dependency: "direct main"
description:
name: package_info_plus
sha256: f69da0d3189a4b4ceaeb1a3defb0f329b3b352517f52bed4290f83d4f06bc08d
sha256: "16eee997588c60225bda0488b6dcfac69280a6b7a3cf02c741895dd370a02968"
url: "https://pub.dev"
source: hosted
version: "9.0.0"
version: "8.3.1"
package_info_plus_platform_interface:
dependency: transitive
description:
@ -817,10 +817,10 @@ packages:
dependency: "direct main"
description:
name: wakelock_plus
sha256: "9296d40c9adbedaba95d1e704f4e0b434be446e2792948d0e4aa977048104228"
sha256: "61713aa82b7f85c21c9f4cd0a148abd75f38a74ec645fcb1e446f882c82fd09b"
url: "https://pub.dev"
source: hosted
version: "1.4.0"
version: "1.3.3"
wakelock_plus_platform_interface:
dependency: transitive
description:

View file

@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
version: 1.0.0+1
version: 0.2.0+2
environment:
sdk: ^3.9.2
@ -49,6 +49,7 @@ dependencies:
flutter_foreground_task: ^6.1.2
wakelock_plus: ^1.2.8
characters: ^1.4.0
package_info_plus: ^8.0.0
dev_dependencies:
flutter_test: