更新样式
BIN
assets/img/avatar.jpg
Normal file
|
After Width: | Height: | Size: 61 KiB |
|
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 6.2 KiB |
|
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 62 KiB |
|
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 25 KiB |
@@ -554,14 +554,16 @@
|
||||
"其他设备正在绑定中,是否终止其他设备绑定?": "Another device is binding. Terminate?",
|
||||
"未配置网络提示": "Network Not Configured",
|
||||
"图形参考": "Graph Reference",
|
||||
"正常心率窦性图": "Normal Sinus Rhythm Chart",
|
||||
"窦性心律不齐图": "Sinus Arrhythmia Chart",
|
||||
"持续性房颤图": " Continuous Ventricular Flutter Chart",
|
||||
"阵法性房颤图": " Arrhythmia Chart",
|
||||
"正常心率窦性图": "Normal Sinus Rhythm",
|
||||
"窦性心律不齐图": "Sinus Arrhythmia",
|
||||
"持续性房颤图": " Persistent Atrial Fibrillation",
|
||||
"阵法性房颤图": " Paroxysmal Atrial Fibrillation",
|
||||
"设备连接超时,请重试": "Device connection timed out, please try again",
|
||||
"s后超时": "s timeout",
|
||||
"未选择图片": "No Image Selected",
|
||||
"无效的手机号码": "Invalid Phone",
|
||||
"联系人不能为空": "Contact cannot be empty",
|
||||
"联系电话不能为空": "Contact number cannot be empty"
|
||||
"联系电话不能为空": "Contact number cannot be empty",
|
||||
"配网成功": "Network configured successfully",
|
||||
"配网失败": "Network configuration failed"
|
||||
}
|
||||
@@ -556,13 +556,14 @@
|
||||
"微信用户": "微信用户",
|
||||
"其他设备正在绑定中,是否终止其他设备绑定?": "其他设备正在绑定中,是否终止其他设备绑定?",
|
||||
"图形参考": "图像参考",
|
||||
"正常心率窦性图": "正常心率窦性图",
|
||||
"窦性心律不齐图": "窦性心律不齐图",
|
||||
"持续性房颤图": "持续性房颤图",
|
||||
"阵法性房颤图": "阵法性房颤图",
|
||||
"正常心率窦性图": "正常心率窦性",
|
||||
"窦性心律不齐图": "窦性心律不齐",
|
||||
"持续性房颤图": "持续性房颤",
|
||||
"阵法性房颤图": "阵法性房颤",
|
||||
"s后超时": "s后超时",
|
||||
"无效的手机号码": "无效的手机号码",
|
||||
"联系人不能为空": "联系人不能为空",
|
||||
"联系电话不能为空": "联系电话不能为空"
|
||||
|
||||
"联系电话不能为空": "联系电话不能为空",
|
||||
"配网成功": "配网成功",
|
||||
"配网失败": "配网失败"
|
||||
}
|
||||
@@ -559,5 +559,7 @@
|
||||
"s后超时": "s後超時",
|
||||
"无效的手机号码": "無效的手機號碼",
|
||||
"联系人不能为空": " 聯繫人不能為空",
|
||||
"联系电话不能为空": "聯繫電話不能為空"
|
||||
"联系电话不能为空": "聯繫電話不能為空",
|
||||
"配网成功": "配網成功",
|
||||
"配网失败": "配網失敗"
|
||||
}
|
||||
@@ -99,7 +99,7 @@ class _DynamicReportDetailWidgetState extends State<DynamicReportDetailWidget> {
|
||||
},
|
||||
child: Container(
|
||||
constraints: BoxConstraints(
|
||||
maxWidth: MediaQuery.sizeOf(context).width * 0.6,
|
||||
maxWidth: MediaQuery.sizeOf(context).width * 0.5,
|
||||
),
|
||||
child: Text(
|
||||
'${targetDevice['person']?['name'] == null ? '未命名'.tr : targetDevice['person']['name']}',
|
||||
|
||||
@@ -119,7 +119,7 @@ class _SleepDateWidgetState extends State<SleepDateWidget> {
|
||||
fontSize: 48.rpx,
|
||||
letterSpacing: 0.0,
|
||||
color: widget.textColor ??
|
||||
themeController.currentColor.sc4,
|
||||
themeController.currentColor.sc3,
|
||||
fontWeight: FontWeight.w500, // 加粗
|
||||
),
|
||||
),
|
||||
@@ -161,7 +161,7 @@ class _SleepDateWidgetState extends State<SleepDateWidget> {
|
||||
16.rpx, 0, 16.rpx, 0),
|
||||
iconPadding: EdgeInsetsDirectional.fromSTEB(0, 0, 0, 0),
|
||||
color: widget.textColor ??
|
||||
themeController.currentColor.sc4,
|
||||
themeController.currentColor.sc4.withOpacity(0.2),
|
||||
textStyle: TextStyle(
|
||||
// fontFamily: 'Inter Tight',
|
||||
color: themeController.currentColor.sc3,
|
||||
|
||||
@@ -61,6 +61,8 @@ class LoginController extends GetControllerEx<LoginModel> {
|
||||
attr = GetModel(LoginModel()).obs;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//登录
|
||||
Future<ApiResponse> login(BuildContext context) async {
|
||||
ApiResponse apiResponse = ApiResponse(code: -1, msg: "其他手机登录页.登录失败".tr);
|
||||
|
||||
@@ -153,6 +153,7 @@ class PersonController extends GetControllerEx<PersonModel> {
|
||||
}
|
||||
if (name.value.isEmpty) {
|
||||
// apiResponse.msg = "请输入姓名".tr;
|
||||
apiResponse.msg = "操作成功".tr;
|
||||
apiResponse.code = 1;
|
||||
return apiResponse;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import 'dart:convert';
|
||||
import 'dart:ui';
|
||||
|
||||
import 'package:ef/ef.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
@@ -13,7 +14,7 @@ class LanguageModel {
|
||||
String? filename; // 语言文件名称
|
||||
String? language_name; // 语言名称
|
||||
bool? selected; // 是否选中
|
||||
String? language_code;//语言简称
|
||||
String? language_code; //语言简称
|
||||
|
||||
LanguageModel();
|
||||
|
||||
@@ -36,6 +37,11 @@ class LanguageController extends GetControllerEx<LanguageModel> {
|
||||
RxList languageList = [].obs;
|
||||
var selectLanguage = Rx<LanguageModel?>(null);
|
||||
|
||||
// final appLocale = Rx<Locale>(Locale('zh', 'CN'));
|
||||
final appLocale = Rx<Locale>(
|
||||
AppLanguage().isChinese() ? const Locale('zh', 'CN') : const Locale('en', 'US'),
|
||||
);
|
||||
|
||||
|
||||
Future<void> initLanuageList() async {
|
||||
try {
|
||||
@@ -91,5 +97,4 @@ class LanguageController extends GetControllerEx<LanguageModel> {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ extension APPDeviceUpgradeExtension on APPDeviceUpgrade {
|
||||
case APPDeviceUpgrade.upgrading:
|
||||
return "升级中".tr;
|
||||
case APPDeviceUpgrade.nothing:
|
||||
return "扫描中".tr;
|
||||
return "".tr;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -110,7 +110,7 @@ class AppLanguage extends Translations {
|
||||
Locale get currentLocale {
|
||||
// final parts = _currentLanguageCode.split('-');
|
||||
// return Locale(parts[0], parts.length > 1 ? parts[1] : null);
|
||||
return isChinese()? Locale('zh', 'CN') : Locale('en', 'US');
|
||||
return isChinese()? const Locale('zh', 'CN') : const Locale('en', 'US');
|
||||
}
|
||||
|
||||
bool isChinese() {
|
||||
|
||||
107
lib/main.dart
@@ -22,6 +22,7 @@ import 'package:vbvs_app/common/util/DailyLogUtils.dart';
|
||||
import 'package:vbvs_app/common/util/Dio.dart';
|
||||
import 'package:vbvs_app/common/util/FitTool.dart';
|
||||
import 'package:vbvs_app/common/util/JPushUtil.dart';
|
||||
import 'package:vbvs_app/common/util/MyUtils.dart';
|
||||
import 'package:vbvs_app/common/util/requestWithLog.dart';
|
||||
import 'package:vbvs_app/controller/date/CalendarController.dart';
|
||||
import 'package:vbvs_app/controller/device/blueteeth_bind_controller.dart';
|
||||
@@ -82,7 +83,7 @@ import 'package:vbvs_app/pages/mh_page/user/controller/bind_tel_controller.dart'
|
||||
import 'package:vbvs_app/pages/mh_page/user/controller/mht_login_controller.dart';
|
||||
import 'package:vbvs_app/pages/mh_page/user/controller/mht_register_controller.dart';
|
||||
import 'package:vbvs_app/pages/mh_page/user/controller/update_password_controller.dart';
|
||||
import 'package:vbvs_app/routers/mh_routers.dart';
|
||||
import 'package:vbvs_app/routers/mh_routers.dart' as mh_routers_themecontroller;
|
||||
|
||||
import 'controller/mh_controller/apply_repair_controller.dart';
|
||||
import 'controller/user_info_controller.dart';
|
||||
@@ -846,7 +847,7 @@ class MyApp extends StatelessWidget {
|
||||
Locale('zh', 'CN'),
|
||||
],
|
||||
initialRoute: "/mianPageBottomChange",
|
||||
onGenerateRoute: mhonGenerateRoute,
|
||||
onGenerateRoute: mh_routers_themecontroller.mhonGenerateRoute,
|
||||
initialBinding: BindingsBuilder(() => [
|
||||
// Get.lazyPut(() => UserInfoController()),
|
||||
Get.put(GlobalController()),
|
||||
@@ -906,55 +907,59 @@ class MyApp extends StatelessWidget {
|
||||
}
|
||||
|
||||
Widget buildth(BuildContext context, BoxConstraints cons) {
|
||||
return GetMaterialApp(
|
||||
translations: AppLanguage(),
|
||||
// locale: const Locale("zh", "CN"),
|
||||
locale: AppLanguage().currentLocale, // ✅ 动态读取当前语言
|
||||
fallbackLocale: const Locale("zh", "CN"),
|
||||
localizationsDelegates: [
|
||||
GlobalMaterialLocalizations.delegate,
|
||||
GlobalWidgetsLocalizations.delegate,
|
||||
GlobalCupertinoLocalizations.delegate,
|
||||
SfGlobalLocalizations.delegate,
|
||||
],
|
||||
supportedLocales: [
|
||||
const Locale('zh', 'CN'), // 中文
|
||||
const Locale('en', 'US'), // ⚠️ 添加你支持的语言
|
||||
],
|
||||
debugShowCheckedModeBanner: false,
|
||||
title: '太和e护',
|
||||
theme: themeController.currentTheme,
|
||||
// home: const MyHomePage(title: '智慧眠花糖 Home Page'),
|
||||
initialRoute: "/mianPageBottomChange",
|
||||
onGenerateRoute: onGenerateRoute,
|
||||
initialBinding: BindingsBuilder(() => [
|
||||
// Get.lazyPut(() => UserInfoController()),
|
||||
Get.put(GlobalController()),
|
||||
Get.put(WeatherModelController()),
|
||||
Get.lazyPut(() => ApplyRepairController()),
|
||||
Get.lazyPut(() => MainPageController()),
|
||||
Get.lazyPut(() => BlueteethBindController()),
|
||||
Get.lazyPut(() => PersonController()),
|
||||
Get.lazyPut(() => CountdownController()),
|
||||
Get.lazyPut(() => LoginController()),
|
||||
Get.lazyPut(() => DeviceTypeController()),
|
||||
Get.lazyPut(() => BodyDeviceController()),
|
||||
Get.lazyPut(() => HomeController()),
|
||||
Get.lazyPut(() => DeviceShareController()),
|
||||
Get.lazyPut(() => DeviceShareListController()),
|
||||
Get.lazyPut(() => DeviceCalibrationController()),
|
||||
Get.lazyPut(() => RepairController()),
|
||||
Get.lazyPut(() => UserPdfController()),
|
||||
Get.lazyPut(() => PrivacyPdfController()),
|
||||
Get.lazyPut(() => CalendarController()),
|
||||
Get.lazyPut(() => SleepReportController()),
|
||||
Get.lazyPut(() => MessageReviewController()),
|
||||
Get.lazyPut(() => MessageSettingController()),
|
||||
Get.lazyPut(() => CommonMessageSettingController()),
|
||||
Get.lazyPut(() => AuthBindTelController()),
|
||||
Get.lazyPut(() => MHTLoginController()),
|
||||
Get.lazyPut(() => MHTRegisterController()),
|
||||
]));
|
||||
return Obx(() {
|
||||
var aa = languageController.appLocale.value;
|
||||
return GetMaterialApp(
|
||||
translations: AppLanguage(),
|
||||
// locale: const Locale("zh", "CN"),
|
||||
locale: AppLanguage().currentLocale, // ✅ 动态读取当前语言
|
||||
// locale:languageController.appLocale.value, // ✅ 动态读取当前语言
|
||||
fallbackLocale: const Locale("zh", "CN"),
|
||||
localizationsDelegates: [
|
||||
GlobalMaterialLocalizations.delegate,
|
||||
GlobalWidgetsLocalizations.delegate,
|
||||
GlobalCupertinoLocalizations.delegate,
|
||||
SfGlobalLocalizations.delegate,
|
||||
],
|
||||
supportedLocales: [
|
||||
const Locale('zh', 'CN'), // 中文
|
||||
const Locale('en', 'US'), // ⚠️ 添加你支持的语言
|
||||
],
|
||||
debugShowCheckedModeBanner: false,
|
||||
title: '太和e护',
|
||||
theme: themeController.currentTheme,
|
||||
// home: const MyHomePage(title: '智慧眠花糖 Home Page'),
|
||||
initialRoute: "/mianPageBottomChange",
|
||||
onGenerateRoute: onGenerateRoute,
|
||||
initialBinding: BindingsBuilder(() => [
|
||||
// Get.lazyPut(() => UserInfoController()),
|
||||
Get.put(GlobalController()),
|
||||
Get.put(WeatherModelController()),
|
||||
Get.lazyPut(() => ApplyRepairController()),
|
||||
Get.lazyPut(() => MainPageController()),
|
||||
Get.lazyPut(() => BlueteethBindController()),
|
||||
Get.lazyPut(() => PersonController()),
|
||||
Get.lazyPut(() => CountdownController()),
|
||||
Get.lazyPut(() => LoginController()),
|
||||
Get.lazyPut(() => DeviceTypeController()),
|
||||
Get.lazyPut(() => BodyDeviceController()),
|
||||
Get.lazyPut(() => HomeController()),
|
||||
Get.lazyPut(() => DeviceShareController()),
|
||||
Get.lazyPut(() => DeviceShareListController()),
|
||||
Get.lazyPut(() => DeviceCalibrationController()),
|
||||
Get.lazyPut(() => RepairController()),
|
||||
Get.lazyPut(() => UserPdfController()),
|
||||
Get.lazyPut(() => PrivacyPdfController()),
|
||||
Get.lazyPut(() => CalendarController()),
|
||||
Get.lazyPut(() => SleepReportController()),
|
||||
Get.lazyPut(() => MessageReviewController()),
|
||||
Get.lazyPut(() => MessageSettingController()),
|
||||
Get.lazyPut(() => CommonMessageSettingController()),
|
||||
Get.lazyPut(() => AuthBindTelController()),
|
||||
Get.lazyPut(() => MHTLoginController()),
|
||||
Get.lazyPut(() => MHTRegisterController()),
|
||||
]));
|
||||
});
|
||||
}
|
||||
|
||||
int selectapp = AppConstants().ent_type;
|
||||
|
||||
@@ -12,6 +12,7 @@ import 'package:vbvs_app/common/util/FitTool.dart';
|
||||
import 'package:vbvs_app/common/util/MyUtils.dart';
|
||||
import 'package:vbvs_app/component/tool/ClickableContainer.dart';
|
||||
import 'package:vbvs_app/component/tool/CustomCard.dart';
|
||||
import 'package:vbvs_app/component/tool/NewTopSlideNotification.dart';
|
||||
import 'package:vbvs_app/component/tool/ToggleColorContainer.dart';
|
||||
import 'package:vbvs_app/component/tool/TopSlideNotification.dart';
|
||||
import 'package:vbvs_app/controller/device/blueteeth_bind_controller.dart';
|
||||
@@ -468,6 +469,9 @@ class _DeviceDataComponentWidgetState extends State<DeviceDataComponentWidget> {
|
||||
widget.device['_id'],
|
||||
);
|
||||
if (response.code == HttpStatusCodes.ok) {
|
||||
NewTopSlideNotification.show(
|
||||
text: response.msg!,
|
||||
);
|
||||
await bodyDeviceController.getDeviceList();
|
||||
bodyDeviceController.updateAll();
|
||||
} else {
|
||||
@@ -569,9 +573,13 @@ class _DeviceDataComponentWidgetState extends State<DeviceDataComponentWidget> {
|
||||
ToggleColorContainer(
|
||||
key: _arrowKey,
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
// 16.rpx,
|
||||
// 16.rpx,
|
||||
// 14.rpx,
|
||||
// 16.rpx,
|
||||
25.rpx,
|
||||
16.rpx,
|
||||
16.rpx,
|
||||
14.rpx,
|
||||
25.rpx,
|
||||
16.rpx,
|
||||
),
|
||||
initialColor: Colors.transparent,
|
||||
@@ -1007,8 +1015,12 @@ class _DeviceDataComponentWidgetState extends State<DeviceDataComponentWidget> {
|
||||
? "在线".tr
|
||||
: "离线".tr, // 状态部分
|
||||
style: TextStyle(
|
||||
color: themeController.currentColor
|
||||
.sc2, // 同样颜色,也可改成其他颜色
|
||||
color: widget.device['status']
|
||||
['status'] ==
|
||||
1
|
||||
? themeController.currentColor.sc2
|
||||
: themeController.currentColor
|
||||
.sc9, // 同样颜色,也可改成其他颜色
|
||||
fontSize: AppConstants()
|
||||
.title_text_fontSize,
|
||||
),
|
||||
|
||||
@@ -571,7 +571,7 @@ class _AfterWifiPagePersonState extends State<AfterWifiPagePerson> {
|
||||
TopSlideNotification
|
||||
.show(
|
||||
context,
|
||||
text: "wifi页.配网成功".tr,
|
||||
text: "配网成功".tr,
|
||||
textColor:
|
||||
themeController
|
||||
.currentColor
|
||||
@@ -587,7 +587,7 @@ class _AfterWifiPagePersonState extends State<AfterWifiPagePerson> {
|
||||
TopSlideNotification
|
||||
.show(
|
||||
context,
|
||||
text: "wifi页.配网失败".tr,
|
||||
text: "配网失败".tr,
|
||||
textColor:
|
||||
themeController
|
||||
.currentColor
|
||||
@@ -603,7 +603,7 @@ class _AfterWifiPagePersonState extends State<AfterWifiPagePerson> {
|
||||
// Navigator.pop(context);
|
||||
TopSlideNotification.show(
|
||||
context,
|
||||
text: "wifi页.配网失败".tr,
|
||||
text: "配网失败".tr,
|
||||
textColor:
|
||||
themeController
|
||||
.currentColor
|
||||
|
||||
@@ -544,6 +544,7 @@ class _BlueteethDevicePageState extends State<BlueteethDevicePage> {
|
||||
fontFamily: 'Inter',
|
||||
fontSize: 26.rpx,
|
||||
letterSpacing: 0.0,
|
||||
color: themeController.currentColor.sc4,
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
|
||||
@@ -853,19 +853,23 @@ class _CalibrationPersonPageState extends State<CalibrationPersonPage> {
|
||||
),
|
||||
onWillPop: () async {
|
||||
bool exit = false;
|
||||
if (deviceCalibrationController.flag.value != 2) {
|
||||
showConfirmDialog(context, Container(), "校准未完成提示".tr,
|
||||
onConfirm: () async {
|
||||
if (start) {
|
||||
if (deviceCalibrationController.flag.value != 2) {
|
||||
showConfirmDialog(context, Container(), "校准未完成提示".tr,
|
||||
onConfirm: () async {
|
||||
exit = true;
|
||||
// await Get.toNamed("/personPage");
|
||||
// print("object");
|
||||
deviceCalibrationController.process.value = 0;
|
||||
deviceCalibrationController.bed_calibration.value = 0;
|
||||
deviceCalibrationController.position_calibration.value = 0;
|
||||
blueteethBindController.cid!.value = "";
|
||||
}, onCancel: () {
|
||||
exit = false;
|
||||
});
|
||||
} else {
|
||||
exit = true;
|
||||
// await Get.toNamed("/personPage");
|
||||
// print("object");
|
||||
deviceCalibrationController.process.value = 0;
|
||||
deviceCalibrationController.bed_calibration.value = 0;
|
||||
deviceCalibrationController.position_calibration.value = 0;
|
||||
blueteethBindController.cid!.value = "";
|
||||
}, onCancel: () {
|
||||
exit = false;
|
||||
});
|
||||
}
|
||||
} else {
|
||||
exit = true;
|
||||
}
|
||||
|
||||
@@ -156,6 +156,8 @@ class _DeviceShareListPageState extends State<DeviceShareListPage> {
|
||||
fontFamily: 'Inter',
|
||||
fontSize: 26.rpx,
|
||||
letterSpacing: 0.0,
|
||||
color: themeController
|
||||
.currentColor.sc4,
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
@@ -444,7 +446,7 @@ class _DeviceShareListPageState extends State<DeviceShareListPage> {
|
||||
"删除".tr,
|
||||
style: TextStyle(
|
||||
fontSize: AppConstants().normal_text_fontSize,
|
||||
color: themeController.currentColor.sc3,
|
||||
color: themeController.currentColor.sc9,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -207,6 +207,7 @@ class _DeviceSharePageState extends State<DeviceSharePage> {
|
||||
fontFamily: 'Inter',
|
||||
fontSize: 26.rpx,
|
||||
letterSpacing: 0.0,
|
||||
color: themeController.currentColor.sc4,
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
|
||||
@@ -37,7 +37,7 @@ class _MessagePageState extends State<MessagePage> {
|
||||
|
||||
// 监听切换语言
|
||||
subscription = EventBus().on<SwitchLanguageEvent>().listen((event) {
|
||||
ef.log("切换语言事件通知");
|
||||
ef.log("切换语言事件通知:${event.language}");
|
||||
_fetchMessageData();
|
||||
});
|
||||
_fetchMessageData();
|
||||
|
||||
@@ -143,7 +143,7 @@ class _MinePageState extends State<MinePage> {
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
child: login == 1
|
||||
/* child: login == 1
|
||||
? (userInfoController.model.user!
|
||||
.avatar ==
|
||||
null ||
|
||||
@@ -158,6 +158,24 @@ class _MinePageState extends State<MinePage> {
|
||||
.model.user!.avatar!,
|
||||
fit: BoxFit.cover,
|
||||
))
|
||||
: Image.asset(
|
||||
"assets/img/avatar.png",
|
||||
fit: BoxFit.cover,
|
||||
), */
|
||||
child: login == 1
|
||||
? (userInfoController.model.user!
|
||||
.avatar ==
|
||||
null ||
|
||||
userInfoController.model
|
||||
.user!.avatar!.isEmpty
|
||||
? Image.asset(
|
||||
"assets/img/avatar.png",
|
||||
fit: BoxFit.cover,
|
||||
)
|
||||
: Image.asset(
|
||||
"assets/img/avatar.png",
|
||||
fit: BoxFit.cover,
|
||||
))
|
||||
: Image.asset(
|
||||
"assets/img/avatar.png",
|
||||
fit: BoxFit.cover,
|
||||
@@ -674,10 +692,12 @@ class _MinePageState extends State<MinePage> {
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Text(
|
||||
'V1.0.2511.17',
|
||||
'V1.0.2511.18',
|
||||
style: TextStyle(
|
||||
fontFamily: 'Inter',
|
||||
color: Color(0xFFD9E3EB),
|
||||
// color: Color(0xFFD9E3EB),
|
||||
color: themeController
|
||||
.currentColor.sc4,
|
||||
fontSize: 26.rpx,
|
||||
letterSpacing: 0.0,
|
||||
),
|
||||
|
||||
@@ -1319,8 +1319,7 @@ class ApplyRepairPage extends GetView<ApplyRepairController> {
|
||||
fontSize: AppFontsize
|
||||
.normal_text_size,
|
||||
letterSpacing: 0,
|
||||
color: const Color(
|
||||
0XFF929699)),
|
||||
color: themeController.currentColor.sc4),
|
||||
enabledBorder:
|
||||
UnderlineInputBorder(
|
||||
borderSide: const BorderSide(
|
||||
@@ -1526,6 +1525,7 @@ class ApplyRepairPage extends GetView<ApplyRepairController> {
|
||||
'Readex Pro',
|
||||
letterSpacing:
|
||||
0,
|
||||
color: themeController.currentColor.sc4,
|
||||
),
|
||||
enabledBorder:
|
||||
UnderlineInputBorder(
|
||||
@@ -1688,6 +1688,7 @@ class ApplyRepairPage extends GetView<ApplyRepairController> {
|
||||
'Readex Pro',
|
||||
letterSpacing:
|
||||
0,
|
||||
color: themeController.currentColor.sc4,
|
||||
),
|
||||
enabledBorder:
|
||||
UnderlineInputBorder(
|
||||
|
||||
@@ -329,11 +329,13 @@ class BookInfoPage extends GetView<BookInfoController> {
|
||||
),
|
||||
hintText: '输入姓名'.tr,
|
||||
hintStyle: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
fontSize: AppFontsize
|
||||
.normal_text_size,
|
||||
letterSpacing: 0,
|
||||
color: Color(0xFF929699)),
|
||||
fontFamily: 'Readex Pro',
|
||||
fontSize: AppFontsize
|
||||
.normal_text_size,
|
||||
letterSpacing: 0,
|
||||
color: themeController
|
||||
.currentColor.sc4,
|
||||
),
|
||||
enabledBorder:
|
||||
UnderlineInputBorder(
|
||||
borderSide:
|
||||
@@ -464,11 +466,13 @@ class BookInfoPage extends GetView<BookInfoController> {
|
||||
),
|
||||
hintText: '输入手机号'.tr,
|
||||
hintStyle: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
fontSize: AppFontsize
|
||||
.normal_text_size,
|
||||
letterSpacing: 0,
|
||||
color: Color(0xFF929699)),
|
||||
fontFamily: 'Readex Pro',
|
||||
fontSize: AppFontsize
|
||||
.normal_text_size,
|
||||
letterSpacing: 0,
|
||||
color: themeController
|
||||
.currentColor.sc4,
|
||||
),
|
||||
enabledBorder:
|
||||
UnderlineInputBorder(
|
||||
borderSide:
|
||||
|
||||
@@ -22,8 +22,6 @@ import 'package:vbvs_app/model/BleDeviceData.dart';
|
||||
import 'package:vbvs_app/pages/mh_page/device/component/tool/BedControlService.dart';
|
||||
import 'package:vbvs_app/pages/mh_page/device/controller/mht_bluetooth_controller.dart';
|
||||
import 'package:vbvs_app/pages/mh_page/device/model/BlueToothDataModel.dart';
|
||||
import 'package:vbvs_app/pages/mh_page/device/upgrade/device_upgrade.dart';
|
||||
import 'package:vbvs_app/pages/mh_page/device/upgrade/tool/device_upgrade_tool.dart';
|
||||
import 'package:vbvs_app/pages/mh_page/homepage/controller/mht_home_controller.dart';
|
||||
|
||||
class UpgradeDevice extends StatefulWidget {
|
||||
@@ -95,8 +93,9 @@ class _UpgradeDeviceState extends State<UpgradeDevice> {
|
||||
highlightColor: Colors.transparent,
|
||||
padding: EdgeInsets.all(0),
|
||||
onTap: () {
|
||||
//取消升级
|
||||
MultiDeviceFirmwareUpdater().cancelUpgrade(widget.bleDevice.mac);
|
||||
//取消升级
|
||||
MultiDeviceFirmwareUpdater()
|
||||
.cancelUpgrade(widget.bleDevice.mac);
|
||||
},
|
||||
child: Row(
|
||||
children: [
|
||||
@@ -162,28 +161,43 @@ class _UpgradeDeviceState extends State<UpgradeDevice> {
|
||||
child: Column(
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Container(
|
||||
width: MediaQuery.sizeOf(context).width * 0.14,
|
||||
constraints: BoxConstraints(minWidth: 106.rpx),
|
||||
child: Text(
|
||||
"MAC".tr,
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Container(
|
||||
width: MediaQuery.sizeOf(context).width * 0.14,
|
||||
constraints: BoxConstraints(minWidth: 106.rpx),
|
||||
child: Text(
|
||||
"MAC".tr,
|
||||
style: TextStyle(
|
||||
color: stringToColor("#929699"),
|
||||
fontSize: 26.rpx,
|
||||
),
|
||||
maxLines: 2,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
"${device['mac']}",
|
||||
style: TextStyle(
|
||||
fontSize: 26.rpx,
|
||||
color: stringToColor("#333333")),
|
||||
),
|
||||
].divide(SizedBox(width: 33.rpx)),
|
||||
),
|
||||
Obx(() {
|
||||
var aa = mhtBlueToothController.allSelect.value;
|
||||
return Text(
|
||||
"${APPDeviceUpgradeExtension.nameFromInt(widget.bleDevice.upgradeStatus)}",
|
||||
style: TextStyle(
|
||||
color: stringToColor("#929699"),
|
||||
fontSize: 26.rpx,
|
||||
),
|
||||
maxLines: 2,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
"${device['mac']}",
|
||||
style: TextStyle(
|
||||
fontSize: 26.rpx,
|
||||
color: stringToColor("#333333")),
|
||||
),
|
||||
].divide(SizedBox(width: 33.rpx)),
|
||||
);
|
||||
}),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
|
||||
@@ -161,7 +161,8 @@ class ShareDeviceWidget extends GetView<MHDeviceShareController> {
|
||||
hintText: '请输入对方手机号/邮箱号'.tr,
|
||||
hintStyle: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: const Color(0xFF929699),
|
||||
color: themeController
|
||||
.currentColor.sc4,
|
||||
fontSize: 36.rpx,
|
||||
),
|
||||
enabledBorder:
|
||||
|
||||
@@ -942,6 +942,8 @@ class EditAddressPage extends GetView<AddressController>
|
||||
'Readex Pro',
|
||||
letterSpacing:
|
||||
0,
|
||||
color: themeController
|
||||
.currentColor.sc4,
|
||||
),
|
||||
enabledBorder:
|
||||
UnderlineInputBorder(
|
||||
|
||||
@@ -225,7 +225,8 @@ class _EditBedPageState extends State<EditBedPage> {
|
||||
fontFamily: 'Readex Pro',
|
||||
letterSpacing: 0,
|
||||
fontSize: 36.rpx,
|
||||
color: const Color(0xFF929699),
|
||||
color: themeController
|
||||
.currentColor.sc4,
|
||||
),
|
||||
enabledBorder: UnderlineInputBorder(
|
||||
borderSide: BorderSide.none,
|
||||
|
||||
@@ -76,7 +76,8 @@ class SearchWidget extends GetView {
|
||||
fontFamily: 'Inter',
|
||||
fontSize: 26.rpx,
|
||||
letterSpacing: 0.0,
|
||||
color: Color(0XFFC8CBD2)),
|
||||
color: themeController
|
||||
.currentColor.sc4,),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: Color(0x00000000),
|
||||
|
||||
@@ -184,6 +184,10 @@ class UpdatePasswordPage extends GetView<UpdatePasswordController> {
|
||||
fontFamily:
|
||||
'Readex Pro',
|
||||
letterSpacing: 0,
|
||||
color:
|
||||
themeController
|
||||
.currentColor
|
||||
.sc4,
|
||||
),
|
||||
enabledBorder:
|
||||
UnderlineInputBorder(
|
||||
|
||||
@@ -118,24 +118,49 @@ class _LanguageSettingState extends State<LanguageSetting> {
|
||||
horizontal: 16.rpx),
|
||||
onTap: () async {
|
||||
// 点击事件逻辑
|
||||
for (var lang
|
||||
in languageController
|
||||
.languageList) {
|
||||
lang.selected = (lang ==
|
||||
language); // 根据选择更新状态
|
||||
}
|
||||
languageController
|
||||
.selectLanguage
|
||||
.value = language;
|
||||
EventBus().emit(
|
||||
SwitchLanguageEvent(
|
||||
language.language_code));
|
||||
await AppLanguage()
|
||||
.loadLanguage(language
|
||||
.language_code); // 加载语言
|
||||
languageController
|
||||
.updateAll(); // 更新操作
|
||||
// 更新操作
|
||||
ef.log("切换语言事件通知");
|
||||
try {
|
||||
for (var lang
|
||||
in languageController
|
||||
.languageList) {
|
||||
lang.selected = (lang ==
|
||||
language); // 根据选择更新状态
|
||||
}
|
||||
languageController
|
||||
.selectLanguage
|
||||
.value = language;
|
||||
if (language.language_code ==
|
||||
"zh_CN") {
|
||||
languageController
|
||||
.appLocale.value =
|
||||
const Locale(
|
||||
'zh', 'CN');
|
||||
Get.updateLocale(
|
||||
const Locale(
|
||||
'zh', 'CN'));
|
||||
languageController
|
||||
.updateAll();
|
||||
} else {
|
||||
languageController
|
||||
.appLocale.value =
|
||||
const Locale(
|
||||
'en', 'US');
|
||||
Get.updateLocale(
|
||||
const Locale(
|
||||
'en', 'US'));
|
||||
languageController
|
||||
.updateAll();
|
||||
}
|
||||
EventBus().emit(
|
||||
SwitchLanguageEvent(
|
||||
language
|
||||
.language_code));
|
||||
await AppLanguage()
|
||||
.loadLanguage(language
|
||||
.language_code); // 加载语言
|
||||
languageController
|
||||
.updateAll();
|
||||
await ef.kvdb.write(
|
||||
"th/language",
|
||||
language.language_code);
|
||||
@@ -150,7 +175,7 @@ class _LanguageSettingState extends State<LanguageSetting> {
|
||||
await bodyDeviceController
|
||||
.getSleepReport();
|
||||
} catch (e) {
|
||||
print(e);
|
||||
ef.log("切换语言异常: $e");
|
||||
}
|
||||
},
|
||||
child: Row(
|
||||
@@ -184,6 +209,7 @@ class _LanguageSettingState extends State<LanguageSetting> {
|
||||
value: language.selected ??
|
||||
false, // 根据 selected 状态显示选中或未选中
|
||||
onChanged: (value) async {
|
||||
ef.log("切换语言事件通知1");
|
||||
// 保持原有的状态更改逻辑
|
||||
for (var lang
|
||||
in languageController
|
||||
@@ -199,6 +225,67 @@ class _LanguageSettingState extends State<LanguageSetting> {
|
||||
.language_code); // 加载语言
|
||||
languageController
|
||||
.updateAll(); // 更新操作
|
||||
try {
|
||||
for (var lang
|
||||
in languageController
|
||||
.languageList) {
|
||||
lang.selected = (lang ==
|
||||
language); // 根据选择更新状态
|
||||
}
|
||||
languageController
|
||||
.selectLanguage
|
||||
.value = language;
|
||||
if (language
|
||||
.language_code ==
|
||||
"zh_CN") {
|
||||
languageController
|
||||
.appLocale
|
||||
.value =
|
||||
const Locale(
|
||||
'zh', 'CN');
|
||||
Get.updateLocale(
|
||||
const Locale(
|
||||
'zh', 'CN'));
|
||||
languageController
|
||||
.updateAll();
|
||||
} else {
|
||||
languageController
|
||||
.appLocale
|
||||
.value =
|
||||
const Locale(
|
||||
'en', 'US');
|
||||
Get.updateLocale(
|
||||
const Locale(
|
||||
'en', 'US'));
|
||||
languageController
|
||||
.updateAll();
|
||||
}
|
||||
EventBus().emit(
|
||||
SwitchLanguageEvent(
|
||||
language
|
||||
.language_code));
|
||||
await AppLanguage()
|
||||
.loadLanguage(language
|
||||
.language_code); // 加载语言
|
||||
languageController
|
||||
.updateAll();
|
||||
await ef.kvdb.write(
|
||||
"th/language",
|
||||
language
|
||||
.language_code);
|
||||
WeatherModelController
|
||||
weatherModelController =
|
||||
Get.find();
|
||||
weatherModelController
|
||||
.getCurrentWeather();
|
||||
BodyDeviceController
|
||||
bodyDeviceController =
|
||||
Get.find();
|
||||
await bodyDeviceController
|
||||
.getSleepReport();
|
||||
} catch (e) {
|
||||
ef.log("切换语言异常: $e");
|
||||
}
|
||||
},
|
||||
),
|
||||
].divide(SizedBox(
|
||||
@@ -213,15 +300,6 @@ class _LanguageSettingState extends State<LanguageSetting> {
|
||||
);
|
||||
}),
|
||||
),
|
||||
// ClickableContainer(
|
||||
// backgroundColor: Colors.transparent, // 容器背景色
|
||||
// highlightColor: themeController
|
||||
// .currentColor.sc21, // 点击时的背景色
|
||||
// padding: EdgeInsetsDirectional.fromSTEB(
|
||||
// 40.rpx, 0.rpx, 40.rpx, 0.rpx),
|
||||
// onTap: () {},
|
||||
// child: Container(),
|
||||
// ),
|
||||
]
|
||||
.divide(SizedBox(height: 0.rpx))
|
||||
.addToStart(SizedBox(height: 30.rpx))
|
||||
|
||||
@@ -50,7 +50,7 @@ class _DataShowWidgetState extends State<DataShowWidget> {
|
||||
children: [
|
||||
// 放入传入的 widget1
|
||||
Container(
|
||||
width: MediaQuery.sizeOf(context).width * 0.35, // 固定宽度
|
||||
width: MediaQuery.sizeOf(context).width * 0.44, // 固定宽度
|
||||
decoration: BoxDecoration(),
|
||||
child: Align(
|
||||
alignment: Alignment.centerLeft,
|
||||
@@ -77,7 +77,7 @@ class _DataShowWidgetState extends State<DataShowWidget> {
|
||||
),
|
||||
// 放入传入的 widget3
|
||||
Container(
|
||||
width: MediaQuery.sizeOf(context).width * 0.29, // 固定宽度
|
||||
width: MediaQuery.sizeOf(context).width * 0.2, // 固定宽度
|
||||
decoration: BoxDecoration(),
|
||||
child: Align(
|
||||
alignment: widget.alignment == MainAxisAlignment.start
|
||||
|
||||
@@ -369,7 +369,7 @@ class _HeartPointWidgetState extends State<HeartPointWidget> {
|
||||
child: Column(
|
||||
children: [
|
||||
Image.asset(
|
||||
"assets/img/heartPic3.png",
|
||||
"assets/img/heartPic4.png",
|
||||
width: 120.rpx,
|
||||
height: 120.rpx,
|
||||
),
|
||||
|
||||
@@ -163,7 +163,7 @@ class _UpdateUserPageState extends State<UpdateUserPage> {
|
||||
),
|
||||
ClickableContainer(
|
||||
backgroundColor: Colors.transparent,
|
||||
highlightColor: themeController.currentColor.sc2,
|
||||
highlightColor: themeController.currentColor.sc16,
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
0.rpx, 44.rpx, 0.rpx, 44.rpx),
|
||||
borderRadius: 0,
|
||||
|
||||