多语言显示错误
This commit is contained in:
@@ -48,7 +48,7 @@ class AppConstants {
|
||||
|
||||
//系统参数
|
||||
//运行打包APP模式
|
||||
int ent_type = APPPackageType.MHT.code; //1.默认太和 2.欢睡 3.眠花糖
|
||||
// int ent_type = APPPackageType.TH.code; //1.默认太和 2.欢睡 3.眠花糖
|
||||
// int ent_type = APPPackageType.MHT.code; //1.默认太和 2.欢睡 3.眠花糖
|
||||
int ent_type = APPPackageType.TH.code; //1.默认太和 2.欢睡 3.眠花糖
|
||||
int text_length = 8;
|
||||
}
|
||||
|
||||
@@ -80,9 +80,9 @@ class ApplyRepairController extends GetControllerEx<ApplyRepairModel> {
|
||||
String serviceApi = ServiceConstant.upload_file;
|
||||
String queryUrl = "${serviceAddress}${serviceName}${serviceApi}";
|
||||
String? language = "";
|
||||
if (mhLanguageController.selectLanguage != null) {
|
||||
language = mhLanguageController.selectLanguage.value!.language_code;
|
||||
}
|
||||
if (mhLanguageController.selectLanguage != null) {
|
||||
language = mhLanguageController.selectLanguage.value!.language_code;
|
||||
}
|
||||
if (language != null && language.isNotEmpty) {
|
||||
if (queryUrl.contains("?")) {
|
||||
queryUrl += "&lang=$language";
|
||||
@@ -113,7 +113,7 @@ class ApplyRepairController extends GetControllerEx<ApplyRepairModel> {
|
||||
return ApiResponse(code: -1, msg: "失败".tr);
|
||||
}
|
||||
} else {
|
||||
apiResponse.msg = "未选择图片".tr;
|
||||
apiResponse.msg = "我的.未选择图片".tr;
|
||||
return apiResponse;
|
||||
}
|
||||
} catch (e) {
|
||||
|
||||
@@ -115,7 +115,7 @@ class UserInfoController extends GetControllerEx<UserInfoModel> {
|
||||
return ApiResponse(code: -1, msg: "服务器失败".tr);
|
||||
}
|
||||
} else {
|
||||
apiResponse.msg = "未选择图片".tr;
|
||||
apiResponse.msg = "我的.未选择图片".tr;
|
||||
return apiResponse;
|
||||
}
|
||||
} catch (e) {
|
||||
|
||||
@@ -47,13 +47,13 @@ class _InstantBodyPageState extends State<InstantBodyPage>
|
||||
// int breathrate = 0;
|
||||
// String snores = "否".tr;
|
||||
// int heartrate = 0;
|
||||
String breathState = "未知数据".tr;
|
||||
String inBed = "未知数据".tr;
|
||||
String breathState = "-";
|
||||
String inBed ="-";
|
||||
String onlineState = "离线".tr;
|
||||
Timer? _onlineTimer; // 添加 Timer 引用
|
||||
int bodyMotion = -1;
|
||||
int breathrate = -1;
|
||||
String snores = "未知数据".tr;
|
||||
String snores = "-";
|
||||
int heartrate = -1;
|
||||
|
||||
@override
|
||||
@@ -106,12 +106,12 @@ class _InstantBodyPageState extends State<InstantBodyPage>
|
||||
setState(() {
|
||||
edm.EasyDartModule.logger.info("30 秒内没有接收到数据,设置为离线");
|
||||
onlineState = "离线".tr; // 30 秒内没有接收到数据,设置为离线
|
||||
inBed = "未知数据".tr;
|
||||
inBed = "-";
|
||||
bodyMotion = -1;
|
||||
heartrate = -1;
|
||||
snores = "未知数据".tr;
|
||||
snores ="-";
|
||||
breathrate = -1;
|
||||
breathState = "未知数据".tr;
|
||||
breathState ="-";
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -205,382 +205,6 @@ class _InstantBodyPageState extends State<InstantBodyPage>
|
||||
),
|
||||
body: SafeArea(
|
||||
top: true,
|
||||
// child: Container(
|
||||
// decoration: BoxDecoration(
|
||||
// image: DecorationImage(
|
||||
// image: AssetImage(
|
||||
// (onlineState == "离线".tr || inBed == '离床'.tr)
|
||||
// ? 'assets/img/black_body_still.png' // 静态图
|
||||
// : 'assets/img/body_black.gif', // 动图
|
||||
// ),
|
||||
// fit: BoxFit.cover,
|
||||
// ),
|
||||
// ),
|
||||
// child: Padding(
|
||||
// padding: EdgeInsetsDirectional.fromSTEB(
|
||||
// 0.rpx, 29.rpx, 0.rpx, 0.rpx),
|
||||
// child: Column(
|
||||
// mainAxisSize: MainAxisSize.max,
|
||||
// children: [
|
||||
// Padding(
|
||||
// padding: EdgeInsetsDirectional.fromSTEB(
|
||||
// 30.rpx, 0.rpx, 30.rpx, 120.rpx),
|
||||
// child: ClickableContainer(
|
||||
// backgroundColor: themeController.currentColor.sc5,
|
||||
// highlightColor:
|
||||
// themeController.currentColor.sc5, // 或你希望的点击水波纹颜色
|
||||
// borderRadius: AppConstants()
|
||||
// .normal_container_radius, // 如果你想加圆角可以设置 eg. 12.rpx
|
||||
// padding: EdgeInsets.zero,
|
||||
// onTap: () {
|
||||
// print('点击了体征卡片');
|
||||
// },
|
||||
// child: Row(
|
||||
// mainAxisSize: MainAxisSize.max,
|
||||
// children: [
|
||||
// Flexible(
|
||||
// flex: 2,
|
||||
// child: Column(
|
||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||
// children: [
|
||||
// Row(
|
||||
// children: [
|
||||
// Column(
|
||||
// crossAxisAlignment:
|
||||
// CrossAxisAlignment.end,
|
||||
// children: [
|
||||
// Text(
|
||||
// '实时体征.姓名'.tr,
|
||||
// style:
|
||||
// FlutterFlowTheme.of(context)
|
||||
// .bodyMedium
|
||||
// .override(
|
||||
// fontFamily: 'Inter',
|
||||
// fontSize: 26.rpx,
|
||||
// letterSpacing: 0.0,
|
||||
// color: themeController
|
||||
// .currentColor.sc4,
|
||||
// ),
|
||||
// ),
|
||||
// Text(
|
||||
// '实时体征.年龄'.tr,
|
||||
// style:
|
||||
// FlutterFlowTheme.of(context)
|
||||
// .bodyMedium
|
||||
// .override(
|
||||
// fontFamily: 'Inter',
|
||||
// fontSize: 26.rpx,
|
||||
// letterSpacing: 0.0,
|
||||
// color: themeController
|
||||
// .currentColor.sc4,
|
||||
// ),
|
||||
// ),
|
||||
// ].divide(SizedBox(height: 34.rpx)),
|
||||
// ),
|
||||
// Column(
|
||||
// crossAxisAlignment:
|
||||
// CrossAxisAlignment.start,
|
||||
// children: [
|
||||
// Text(
|
||||
// '${device['person']?['name'] ?? '未命名'.tr}',
|
||||
// style:
|
||||
// FlutterFlowTheme.of(context)
|
||||
// .bodyMedium
|
||||
// .override(
|
||||
// fontFamily: 'Inter',
|
||||
// fontSize: 26.rpx,
|
||||
// letterSpacing: 0.0,
|
||||
// color: themeController
|
||||
// .currentColor.sc3,
|
||||
// ),
|
||||
// ),
|
||||
// Text(
|
||||
// '${MyUtils.getAgeByDate(MyUtils.formatBirthdayTime(device['person']?['birthday'])) ?? '未知数据'.tr}',
|
||||
// style:
|
||||
// FlutterFlowTheme.of(context)
|
||||
// .bodyMedium
|
||||
// .override(
|
||||
// fontFamily: 'Inter',
|
||||
// fontSize: 26.rpx,
|
||||
// letterSpacing: 0.0,
|
||||
// color: themeController
|
||||
// .currentColor.sc3,
|
||||
// ),
|
||||
// ),
|
||||
// ].divide(SizedBox(height: 34.rpx)),
|
||||
// ),
|
||||
// ]
|
||||
// .divide(SizedBox(width: 33.rpx))
|
||||
// .addToStart(SizedBox(width: 37.rpx)),
|
||||
// ),
|
||||
// ]
|
||||
// .addToStart(SizedBox(height: 36.rpx))
|
||||
// .addToEnd(SizedBox(height: 36.rpx)),
|
||||
// ),
|
||||
// ),
|
||||
// Flexible(
|
||||
// flex: 3,
|
||||
// child: Column(
|
||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||
// children: [
|
||||
// Row(
|
||||
// children: [
|
||||
// Column(
|
||||
// crossAxisAlignment:
|
||||
// CrossAxisAlignment.end,
|
||||
// children: [
|
||||
// Text(
|
||||
// '实时体征.设备ID'.tr,
|
||||
// style:
|
||||
// FlutterFlowTheme.of(context)
|
||||
// .bodyMedium
|
||||
// .override(
|
||||
// fontFamily: 'Inter',
|
||||
// fontSize: 26.rpx,
|
||||
// letterSpacing: 0.0,
|
||||
// color: themeController
|
||||
// .currentColor.sc4,
|
||||
// ),
|
||||
// ),
|
||||
// Text(
|
||||
// '实时体征.体重'.tr,
|
||||
// style:
|
||||
// FlutterFlowTheme.of(context)
|
||||
// .bodyMedium
|
||||
// .override(
|
||||
// fontFamily: 'Inter',
|
||||
// fontSize: 26.rpx,
|
||||
// letterSpacing: 0.0,
|
||||
// color: themeController
|
||||
// .currentColor.sc4,
|
||||
// ),
|
||||
// ),
|
||||
// ].divide(SizedBox(height: 34.rpx)),
|
||||
// ),
|
||||
// Expanded(
|
||||
// child: Column(
|
||||
// crossAxisAlignment:
|
||||
// CrossAxisAlignment.start,
|
||||
// children: [
|
||||
// Text(
|
||||
// '${device['code'] ?? '未知数据'.tr}',
|
||||
// // "D11250300003",
|
||||
// style:
|
||||
// FlutterFlowTheme.of(context)
|
||||
// .bodyMedium
|
||||
// .override(
|
||||
// fontFamily: 'Inter',
|
||||
// fontSize: 26.rpx,
|
||||
// letterSpacing: 0.0,
|
||||
// color: themeController
|
||||
// .currentColor.sc3,
|
||||
// ),
|
||||
// maxLines: 1,
|
||||
// overflow: TextOverflow.ellipsis,
|
||||
// ),
|
||||
// Text(
|
||||
// '${device['person']?['weight'] ?? '未知数据'.tr}kg',
|
||||
// style:
|
||||
// FlutterFlowTheme.of(context)
|
||||
// .bodyMedium
|
||||
// .override(
|
||||
// fontFamily: 'Inter',
|
||||
// fontSize: 26.rpx,
|
||||
// letterSpacing: 0.0,
|
||||
// color: themeController
|
||||
// .currentColor.sc3,
|
||||
// ),
|
||||
// ),
|
||||
// ].divide(SizedBox(height: 34.rpx)),
|
||||
// ),
|
||||
// ),
|
||||
// ]
|
||||
// .divide(SizedBox(width: 33.rpx))
|
||||
// .addToStart(SizedBox(width: 37.rpx)),
|
||||
// ),
|
||||
// ]
|
||||
// .addToStart(SizedBox(height: 36.rpx))
|
||||
// .addToEnd(SizedBox(height: 36.rpx)),
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// Expanded(
|
||||
// child: SingleChildScrollView(
|
||||
// child: Column(
|
||||
// children: [
|
||||
// Padding(
|
||||
// padding: EdgeInsetsDirectional.fromSTEB(
|
||||
// 66.rpx, 0, 66.rpx, 0),
|
||||
// child: Container(
|
||||
// // decoration: BoxDecoration(
|
||||
// // image: DecorationImage(
|
||||
// // image: AssetImage(
|
||||
// // onlineState == "离线".tr
|
||||
// // ? 'assets/img/black_body_still.png' // 静态图
|
||||
// // : 'assets/img/body_black.gif', // 动图
|
||||
// // ),
|
||||
// // fit: BoxFit.cover,
|
||||
// // ),
|
||||
// // ),
|
||||
// child: Column(
|
||||
// children: [
|
||||
// Row(
|
||||
// mainAxisAlignment:
|
||||
// MainAxisAlignment.spaceBetween,
|
||||
// children: [
|
||||
// DeviceStatusInfoWidget(
|
||||
// title: "在离床".tr,
|
||||
// iconAsset:
|
||||
// "assets/img/icon/bed_status.svg",
|
||||
// value: inBed,
|
||||
// ),
|
||||
// DeviceStatusInfoWidget(
|
||||
// title: "体动".tr,
|
||||
// iconAsset:
|
||||
// "assets/img/icon/bodymotion.svg",
|
||||
// value: (bodyMotion == null ||
|
||||
// bodyMotion == -1)
|
||||
// ? "未知数据".tr
|
||||
// : "$bodyMotion",
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// Row(
|
||||
// mainAxisAlignment:
|
||||
// MainAxisAlignment.spaceBetween,
|
||||
// children: [
|
||||
// DeviceStatusInfoWidget(
|
||||
// title: "心率".tr,
|
||||
// iconAsset:
|
||||
// "assets/img/icon/heart.svg",
|
||||
// value: (heartrate == null ||
|
||||
// heartrate == -1)
|
||||
// ? "未知数据".tr
|
||||
// : "$heartrate",
|
||||
// ),
|
||||
// DeviceStatusInfoWidget(
|
||||
// title: "打鼾".tr,
|
||||
// iconAsset:
|
||||
// "assets/img/icon/snore.svg",
|
||||
// value: '${snores}'.tr,
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// Row(
|
||||
// mainAxisAlignment:
|
||||
// MainAxisAlignment.spaceBetween,
|
||||
// children: [
|
||||
// DeviceStatusInfoWidget(
|
||||
// title: "呼吸".tr,
|
||||
// iconAsset:
|
||||
// "assets/img/icon/breathe.svg",
|
||||
// value: (breathrate == null ||
|
||||
// breathrate == -1)
|
||||
// ? "未知数据".tr
|
||||
// : "$breathrate",
|
||||
// ),
|
||||
// DeviceStatusInfoWidget(
|
||||
// title: "呼吸暂停".tr,
|
||||
// iconAsset:
|
||||
// "assets/img/icon/breathe_pause.svg",
|
||||
// value: '${breathState}',
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ].divide(SizedBox(height: 49.rpx)),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// Padding(
|
||||
// padding: EdgeInsetsDirectional.fromSTEB(
|
||||
// 0.rpx, 67.rpx, 0.rpx, 0.rpx),
|
||||
// child: Container(
|
||||
// height: 40.rpx,
|
||||
// child: Text(
|
||||
// bodyMotion >= maxBodyMotion ? '请保持静止'.tr : "",
|
||||
// style: FlutterFlowTheme.of(context)
|
||||
// .bodyMedium
|
||||
// .override(
|
||||
// fontFamily: 'Inter',
|
||||
// fontSize: 26.rpx,
|
||||
// letterSpacing: 0.0,
|
||||
// color: themeController.currentColor.sc9,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// // SizedBox(
|
||||
// // height: 207.rpx,
|
||||
// // ),
|
||||
// ],
|
||||
// ),
|
||||
// )),
|
||||
// ClickableContainer(
|
||||
// backgroundColor: Colors.transparent, // 可自定义背景色
|
||||
// highlightColor: Colors.white, // 点击涟漪颜色
|
||||
// borderRadius: 16.rpx, // 圆角大小,可按需调整
|
||||
// padding: EdgeInsetsDirectional.fromSTEB(
|
||||
// 30.rpx, 0.rpx, 30.rpx, 0.rpx),
|
||||
// onTap: () {},
|
||||
// child: Container(
|
||||
// padding: EdgeInsetsDirectional.fromSTEB(
|
||||
// 26.rpx, 26.rpx, 26.rpx, 26.rpx),
|
||||
// decoration: BoxDecoration(
|
||||
// // color: FlutterFlowTheme.of(context)
|
||||
// // .primaryBackground
|
||||
// // .withOpacity(0.6), // 半透明背景
|
||||
// borderRadius: BorderRadius.circular(16.rpx),
|
||||
// border: Border.all(
|
||||
// color: themeController.currentColor.sc4
|
||||
// .withOpacity(0.5),
|
||||
// width: 0.5.rpx,
|
||||
// ),
|
||||
// ),
|
||||
// child: Row(
|
||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||
// children: [
|
||||
// Padding(
|
||||
// padding: EdgeInsetsDirectional.fromSTEB(
|
||||
// 0, 8.rpx, 0, 0),
|
||||
// child: Container(
|
||||
// width: 23.rpx,
|
||||
// height: 23.rpx,
|
||||
// // width: double.infinity,
|
||||
// decoration: BoxDecoration(),
|
||||
// child: SvgPicture.asset(
|
||||
// 'assets/img/icon/tips.svg',
|
||||
// fit: BoxFit.cover,
|
||||
// color: themeController.currentColor.sc4,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// Expanded(
|
||||
// child: Text(
|
||||
// '实时体征.提示'.tr,
|
||||
// style: FlutterFlowTheme.of(context)
|
||||
// .bodyMedium
|
||||
// .override(
|
||||
// fontFamily: 'Inter',
|
||||
// letterSpacing: 0.0,
|
||||
// color: themeController.currentColor.sc4,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ].divide(SizedBox(width: 23.rpx)),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// SizedBox(
|
||||
// height: 26.rpx,
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
|
||||
// ),
|
||||
child: Stack(
|
||||
children: [
|
||||
// 背景图只占一半高度
|
||||
@@ -834,7 +458,7 @@ class _InstantBodyPageState extends State<InstantBodyPage>
|
||||
? ("-")
|
||||
: (bodyMotion == null ||
|
||||
bodyMotion == -1)
|
||||
? "未知数据".tr
|
||||
? "-"
|
||||
: "$bodyMotion",
|
||||
),
|
||||
],
|
||||
@@ -851,7 +475,7 @@ class _InstantBodyPageState extends State<InstantBodyPage>
|
||||
? "-"
|
||||
: ((heartrate == null ||
|
||||
heartrate == -1)
|
||||
? "未知数据".tr
|
||||
? "-"
|
||||
: "$heartrate"),
|
||||
),
|
||||
DeviceStatusInfoWidget(
|
||||
@@ -876,7 +500,7 @@ class _InstantBodyPageState extends State<InstantBodyPage>
|
||||
? ("-")
|
||||
: ((breathrate == null ||
|
||||
breathrate == -1)
|
||||
? "未知数据".tr
|
||||
? "-"
|
||||
: "$breathrate"),
|
||||
),
|
||||
DeviceStatusInfoWidget(
|
||||
|
||||
@@ -514,7 +514,7 @@ class _EPageState extends State<PersonPage> {
|
||||
child: Text(
|
||||
personController.weight.value != ""
|
||||
? personController.weight.value
|
||||
: '体重输入提示'.tr,
|
||||
: '人员资料.体重输入提示'.tr,
|
||||
textAlign: TextAlign.right,
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
|
||||
@@ -479,7 +479,6 @@ class _UpdatePageState extends State<UpdatePersonPage> {
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
70.rpx, 50.rpx, 70.rpx, 0),
|
||||
@@ -517,7 +516,7 @@ class _UpdatePageState extends State<UpdatePersonPage> {
|
||||
child: Text(
|
||||
personController.weight.value != ""
|
||||
? personController.weight.value
|
||||
: '体重输入提示'.tr,
|
||||
: '人员资料.体重输入提示'.tr,
|
||||
textAlign: TextAlign.right,
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
@@ -534,7 +533,6 @@ class _UpdatePageState extends State<UpdatePersonPage> {
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
0, 117.rpx, 0, 0),
|
||||
|
||||
@@ -480,7 +480,7 @@ class _SettingPageState extends State<SettingPage> {
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
'退出登录'.tr,
|
||||
'设置页.退出登录'.tr,
|
||||
style: TextStyle(
|
||||
color: themeController.currentColor.sc3,
|
||||
fontFamily: 'Inter',
|
||||
|
||||
Reference in New Issue
Block a user