Przeglądaj źródła

添加版本号

周睿 1 rok temu
rodzic
commit
67e440236d

+ 7 - 1
app_business/lib/view/home/settings.dart

@@ -1,5 +1,6 @@
 import 'package:app_business/service/abase.dart';
 import 'package:app_business/service/api.dart';
+import 'package:app_business/service/app.dart';
 import 'package:flutter/material.dart';
 import 'package:track_common/service/map_watch.dart';
 import 'package:track_common/view.dart';
@@ -8,6 +9,7 @@ class SettingsPage extends StatelessWidget {
   const SettingsPage({super.key});
 
   ApiService get api => Get.find();
+  AppService get app => Get.find();
 
   @override
   Widget build(BuildContext context) {
@@ -17,7 +19,11 @@ class SettingsPage extends StatelessWidget {
             child: Card(
               margin: const EdgeInsets.symmetric(vertical: 24),
               child: ListView(
-                children: [_SettingsElem(title: '退出登录', onTap: onSignOut)],
+                children: [
+                  _SettingsElem(
+                      title: '软件版本', onTap: () {}, tail: Text(app.appVersion)),
+                  _SettingsElem(title: '退出登录', onTap: onSignOut)
+                ],
               ),
             )));
   }

+ 1 - 1
app_business/pubspec.yaml

@@ -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.2.3+2
+version: 1.2.4+2
 
 environment:
   sdk: '>=3.1.5 <4.0.0'