更新
This commit is contained in:
@@ -44,7 +44,7 @@
|
||||
android:usesCleartextTraffic="true"
|
||||
android:name="${applicationName}"
|
||||
android:icon="@mipmap/ic_launchermh"
|
||||
android:label="眠花糖"
|
||||
android:label="智慧眠花糖"
|
||||
android:enableOnBackInvokedCallback="true"
|
||||
>
|
||||
<activity
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
package com.taihe.vbvs_app
|
||||
|
||||
import io.flutter.embedding.android.FlutterActivity
|
||||
|
||||
class MainActivity : FlutterActivity()
|
||||
@@ -1,9 +1,11 @@
|
||||
# storePassword=taihe601
|
||||
# keyPassword=taihe601
|
||||
# keyAlias=testalias
|
||||
# storeFile=test.keystore
|
||||
# 太和e护
|
||||
storePassword=taihe601
|
||||
keyPassword=taihe601
|
||||
keyAlias=testalias
|
||||
storeFile=test.keystore
|
||||
|
||||
storePassword=mht@123456
|
||||
keyPassword=mht@123456
|
||||
keyAlias=mianhuatang
|
||||
storeFile=AppKeys.jks
|
||||
# 眠花糖
|
||||
# storePassword=mht@123456
|
||||
# keyPassword=mht@123456
|
||||
# keyAlias=mianhuatang
|
||||
# storeFile=AppKeys.jks
|
||||
@@ -1,7 +1,6 @@
|
||||
sdk.dir=C:\\Users\\wyf\\AppData\\Local\\Android\\sdk
|
||||
flutter.sdk=D:\\flutter_res\\flutter
|
||||
|
||||
flutter.buildMode=debug
|
||||
flutter.buildMode=release
|
||||
flutter.versionName=1.0.0
|
||||
flutter.versionCode=1
|
||||
flutter.minSdkVersion=22
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
flutter.android.versionName=1.0.5
|
||||
flutter.android.versionName=2.0.1
|
||||
flutter.android.versionCode=6
|
||||
@@ -1,3 +1,3 @@
|
||||
[
|
||||
"assets/miniapp/mhtControl_1.0.56.zip"
|
||||
"assets/miniapp/mhtControl_1.0.57.zip"
|
||||
]
|
||||
@@ -604,7 +604,7 @@
|
||||
"设备已被用户解绑,将取消当前分享!": "设备已被用户解绑,将取消当前分享!",
|
||||
"设备解绑提醒": "设备解绑提醒",
|
||||
"位置权限说明": "位置权限说明",
|
||||
"获得位置信息,连接附近的蓝牙设备与推荐附近门店": "获得位置信息,连接附近的蓝牙设备与推荐附近门店和获取天气情况",
|
||||
"获得位置信息,连接附近的蓝牙设备与推荐附近门店": "获得位置信息,连接附近的蓝牙设备与推荐附近门店和首页获取天气情况",
|
||||
"蓝牙权限说明": "蓝牙权限说明",
|
||||
"搜索链接附近的蓝牙设备": "搜索链接附近的蓝牙设备",
|
||||
"附近设备权限说明": "附近设备权限说明",
|
||||
|
||||
Binary file not shown.
@@ -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;
|
||||
}
|
||||
|
||||
@@ -89,13 +89,13 @@ class _SleepCalendarWidgetState extends State<SleepCalendarWidget> {
|
||||
onSuccess: (res) {
|
||||
showLabel.value = [
|
||||
...res.data,
|
||||
{"level": 5, "name": "无报告", "color": "#9E9E9E"},
|
||||
{"level": 5, "name": "无报告".tr, "color": "#9E9E9E"},
|
||||
// ✅ 注意拼写是 scoreList
|
||||
];
|
||||
},
|
||||
onFailure: (res) {
|
||||
showLabel.value = [
|
||||
{"level": 5, "name": "无报告", "color": "#9E9E9E"},
|
||||
{"level": 5, "name": "无报告".tr, "color": "#9E9E9E"},
|
||||
];
|
||||
},
|
||||
);
|
||||
|
||||
@@ -5,8 +5,11 @@ import 'package:EasyDartModule/EasyDartModule.dart';
|
||||
import 'package:ef/ef.dart';
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
import 'package:vbvs_app/common/color/ServiceConstant.dart';
|
||||
import 'package:vbvs_app/common/color/appConstants.dart';
|
||||
import 'package:vbvs_app/common/color/app_uri_status.dart';
|
||||
import 'package:vbvs_app/common/util/MyUtils.dart';
|
||||
import 'package:vbvs_app/controller/setting/language/language_controller.dart';
|
||||
import 'package:vbvs_app/enum/APPPackageType.dart';
|
||||
import 'package:vbvs_app/model/api_response.dart';
|
||||
|
||||
part 'device_type_controller.g.dart'; // 由json_serializable自动生成的部分
|
||||
@@ -48,9 +51,15 @@ class DeviceTypeController extends GetControllerEx<DeviceTypeModel> {
|
||||
String serviceApi = ServiceConstant.device_type;
|
||||
|
||||
String queryUrl = "${serviceAddress}${serviceName}${serviceApi}";
|
||||
String? language = "";
|
||||
if (languageController.selectLanguage != null) {
|
||||
language = languageController.selectLanguage.value!.language_code;
|
||||
String? language = "";
|
||||
if (AppConstants().ent_type == APPPackageType.MHT.code) {
|
||||
if (mhLanguageController.selectLanguage != null) {
|
||||
language = mhLanguageController.selectLanguage.value!.language_code;
|
||||
}
|
||||
} else {
|
||||
if (languageController.selectLanguage != null) {
|
||||
language = languageController.selectLanguage.value!.language_code;
|
||||
}
|
||||
}
|
||||
if (language != null && language.isNotEmpty) {
|
||||
if (queryUrl.contains("?")) {
|
||||
|
||||
@@ -88,40 +88,4 @@ class ExperienceStoreListController
|
||||
});
|
||||
}
|
||||
|
||||
//determinePosition() async {
|
||||
// bool serviceEnabled;
|
||||
// LocationPermission permission;
|
||||
|
||||
// // Test if location services are enabled.
|
||||
// serviceEnabled = await Geolocator.isLocationServiceEnabled();
|
||||
// if (!serviceEnabled) {
|
||||
// // Location services are not enabled don't continue
|
||||
// // accessing the position and request users of the
|
||||
// // App to enable the location services.
|
||||
// return Future.error('Location services are disabled.');
|
||||
// }
|
||||
|
||||
// permission = await Geolocator.checkPermission();
|
||||
// if (permission == LocationPermission.denied) {
|
||||
// permission = await Geolocator.requestPermission();
|
||||
// if (permission == LocationPermission.denied) {
|
||||
// // Permissions are denied, next time you could try
|
||||
// // requesting permissions again (this is also where
|
||||
// // Android's shouldShowRequestPermissionRationale
|
||||
// // returned true. According to Android guidelines
|
||||
// // your App should show an explanatory UI now.
|
||||
// return Future.error('Location permissions are denied');
|
||||
// }
|
||||
// }
|
||||
|
||||
// if (permission == LocationPermission.deniedForever) {
|
||||
// // Permissions are denied forever, handle appropriately.
|
||||
// return Future.error(
|
||||
// 'Location permissions are permanently denied, we cannot request permissions.');
|
||||
// }
|
||||
|
||||
// // When we reach here, permissions are granted and we can
|
||||
// // continue accessing the position of the device.
|
||||
// position = await Geolocator.getCurrentPosition();
|
||||
//}
|
||||
}
|
||||
|
||||
@@ -191,8 +191,14 @@ class UserInfoController extends GetControllerEx<UserInfoModel> {
|
||||
String serviceApi = ServiceConstant.user_info;
|
||||
String queryUrl = "${serviceAddress}${serviceName}${serviceApi}";
|
||||
String? language = "";
|
||||
if (languageController.selectLanguage != null) {
|
||||
language = languageController.selectLanguage.value!.language_code;
|
||||
if (AppConstants().ent_type == APPPackageType.MHT.code) {
|
||||
if (mhLanguageController.selectLanguage != null) {
|
||||
language = mhLanguageController.selectLanguage.value!.language_code;
|
||||
}
|
||||
} else {
|
||||
if (languageController.selectLanguage != null) {
|
||||
language = languageController.selectLanguage.value!.language_code;
|
||||
}
|
||||
}
|
||||
if (language != null && language.isNotEmpty) {
|
||||
if (queryUrl.contains("?")) {
|
||||
|
||||
@@ -123,7 +123,6 @@ class WeatherModelController extends GetControllerEx<WeatherModel> {
|
||||
} catch (e) {
|
||||
ef.log("$e");
|
||||
}
|
||||
// permission = await Geolocator.checkPermission();
|
||||
try {
|
||||
// 2️⃣ 检查权限(系统弹窗)—— 此时你的提示框仍然显示
|
||||
permission = await Geolocator.checkPermission();
|
||||
@@ -136,12 +135,9 @@ class WeatherModelController extends GetControllerEx<WeatherModel> {
|
||||
Navigator.of(Get.context!, rootNavigator: true).pop();
|
||||
}
|
||||
|
||||
if (permission == LocationPermission.denied) {
|
||||
permission = await Geolocator.requestPermission();
|
||||
if (permission == LocationPermission.denied) {
|
||||
if (permission == LocationPermission.denied) {
|
||||
return Future.error('位置权限被拒绝');
|
||||
}
|
||||
}
|
||||
|
||||
if (permission == LocationPermission.deniedForever) {
|
||||
return Future.error('位置权限被永久拒绝');
|
||||
|
||||
@@ -36,7 +36,7 @@ class MainPageBBottomChange extends StatefulWidget {
|
||||
|
||||
static int? getCurrentIndex() {
|
||||
final state = globalKey.currentState;
|
||||
return state?.selectedIndex;
|
||||
return state?.selectedIndex.value;
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -69,7 +69,7 @@ class MainPageBBottomChange extends StatefulWidget {
|
||||
|
||||
class _HomePageState extends State<MainPageBBottomChange>
|
||||
with SingleTickerProviderStateMixin {
|
||||
int selectedIndex = 0;
|
||||
RxInt selectedIndex = 0.obs;
|
||||
late AnimationController _controller;
|
||||
late Animation<double> _positionAnimation;
|
||||
double currentPosition = 0.0;
|
||||
@@ -122,7 +122,7 @@ class _HomePageState extends State<MainPageBBottomChange>
|
||||
});
|
||||
_controller.forward(from: 0.0);
|
||||
currentPosition = end;
|
||||
selectedIndex = index;
|
||||
selectedIndex.value = index;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -133,7 +133,7 @@ class _HomePageState extends State<MainPageBBottomChange>
|
||||
}
|
||||
|
||||
Widget _buildPageContent() {
|
||||
return Center(child: Text('页面 ${titles[selectedIndex]}'));
|
||||
return Center(child: Text('页面 ${titles[selectedIndex.value]}'));
|
||||
}
|
||||
|
||||
DateTime? _lastBackPressedTime; // 记录上一次返回的时间
|
||||
@@ -155,11 +155,11 @@ class _HomePageState extends State<MainPageBBottomChange>
|
||||
child: Scaffold(
|
||||
backgroundColor: const Color(0xFF011C33),
|
||||
body: IndexedStack(
|
||||
index: selectedIndex,
|
||||
index: selectedIndex.value,
|
||||
children: pages,
|
||||
),
|
||||
bottomNavigationBar: BezierBottomNavigationBar(
|
||||
selectedIndex: selectedIndex,
|
||||
selectedIndex: selectedIndex.value,
|
||||
animatedPosition: _positionAnimation.value,
|
||||
onTap: _onTabTapped,
|
||||
path: path,
|
||||
@@ -186,7 +186,7 @@ class _HomePageState extends State<MainPageBBottomChange>
|
||||
currentPosition = end;
|
||||
|
||||
setState(() {
|
||||
selectedIndex = index;
|
||||
selectedIndex.value = index;
|
||||
dealWebSource(index);
|
||||
});
|
||||
}
|
||||
@@ -195,10 +195,12 @@ class _HomePageState extends State<MainPageBBottomChange>
|
||||
try {
|
||||
UserInfoController userInfoController = Get.find();
|
||||
WebviewTestController webviewTestController = Get.find();
|
||||
|
||||
if (index == 2) {
|
||||
if(webviewTestController.ready.value)
|
||||
WebviewTestController webviewTestController = Get.find();
|
||||
webviewTestController.web.jsbridge?.dart
|
||||
.switchLanguage(mhLanguageController.selectLanguage.value!.language_code);
|
||||
webviewTestController.web.jsbridge?.dart.switchLanguage(
|
||||
mhLanguageController.selectLanguage.value!.language_code);
|
||||
await webviewTestController.web.jsbridge?.dart.pageActive(true);
|
||||
//激活websocket
|
||||
edm.EasyDartModule.websocket.sendData(jsonEncode(WebSocketMessage(
|
||||
@@ -251,7 +253,6 @@ class _HomePageState extends State<MainPageBBottomChange>
|
||||
return;
|
||||
}
|
||||
//当前不处于控制页且连接了该设备-->进行断开
|
||||
//web todo 断开设备连接
|
||||
webviewTestController.web.jsbridge?.dart.disconnectByOtherUser();
|
||||
} else {
|
||||
ef.log("[websocket]:当前处于控制页,给指定用户发送xxx用户已连接");
|
||||
|
||||
@@ -7,12 +7,14 @@ import 'package:flutter_svg/svg.dart';
|
||||
import 'package:flutterflow_ui/flutterflow_ui.dart';
|
||||
import 'package:permission_handler/permission_handler.dart';
|
||||
import 'package:vbvs_app/common/color/appConstants.dart';
|
||||
import 'package:vbvs_app/common/util/CommonVariables.dart';
|
||||
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/controller/main_bottom/global_controller.dart';
|
||||
import 'package:vbvs_app/controller/theme_controller/ThemeController.dart';
|
||||
import 'package:vbvs_app/controller/user_info_controller.dart';
|
||||
import 'package:vbvs_app/pages/common/selectDialog.dart';
|
||||
import 'package:vbvs_app/pages/mh_page/component/mht_bind_dialog.dart';
|
||||
import 'package:vbvs_app/pages/mh_page/device/component/DeviceComponentWidget.dart';
|
||||
import 'package:vbvs_app/pages/mh_page/device/controller/mht_bluetooth_controller.dart';
|
||||
@@ -72,12 +74,92 @@ class _MHTBlueteethDevicePageState extends State<MHTBlueteethDevicePage> {
|
||||
}
|
||||
}
|
||||
|
||||
// Future<void> _requestBluetoothPermission() async {
|
||||
// // showPermissionInfoDialog(Get.context!, CommonVariables().permissionInfo);
|
||||
// // Map<Permission, PermissionStatus> statuses = await [
|
||||
// // Permission.bluetoothScan,
|
||||
// // Permission.bluetoothConnect,
|
||||
// // Permission.location,
|
||||
// // ].request();
|
||||
// Map<Permission, PermissionStatus> statuses = {};
|
||||
// try {
|
||||
// // 1️⃣ 先显示自定义提示弹窗
|
||||
// showPermissionInfoDialog(Get.context!, CommonVariables().permissionInfo);
|
||||
|
||||
// // 2️⃣ 等待一小会,让 UI 有时间渲染提示弹窗
|
||||
// await Future.delayed(const Duration(milliseconds: 300));
|
||||
|
||||
// // 3️⃣ 再去申请权限(系统权限弹窗可能会弹出)
|
||||
// statuses = await [
|
||||
// Permission.bluetoothScan,
|
||||
// Permission.bluetoothConnect,
|
||||
// Permission.location,
|
||||
// ].request();
|
||||
|
||||
// // 这里你可以检查每个权限的状态
|
||||
// ef.log("权限状态: $statuses");
|
||||
// } catch (e) {
|
||||
// ef.log("申请权限出错: $e");
|
||||
// } finally {
|
||||
// // 4️⃣ 无论成功失败,最后关闭提示弹窗
|
||||
// if (Get.context != null) {
|
||||
// Navigator.of(Get.context!, rootNavigator: true).pop();
|
||||
// }
|
||||
// }
|
||||
|
||||
// bool allGranted = statuses[Permission.bluetoothScan]?.isGranted == true &&
|
||||
// statuses[Permission.bluetoothConnect]?.isGranted == true &&
|
||||
// statuses[Permission.location]?.isGranted == true;
|
||||
|
||||
// if (allGranted) {
|
||||
// _startScanning();
|
||||
// _startPeriodicScan();
|
||||
// } else {
|
||||
// _showPermissionDeniedDialog();
|
||||
// }
|
||||
// }
|
||||
|
||||
Future<void> _requestBluetoothPermission() async {
|
||||
Map<Permission, PermissionStatus> statuses = await [
|
||||
Permission.bluetoothScan,
|
||||
Permission.bluetoothConnect,
|
||||
Permission.location,
|
||||
].request();
|
||||
Map<Permission, PermissionStatus> statuses = {};
|
||||
bool dialogShown = false; // 标记是否弹过权限提示弹窗
|
||||
|
||||
try {
|
||||
// 检查是否已授权
|
||||
bool alreadyGranted = await Permission.bluetoothScan.isGranted &&
|
||||
await Permission.bluetoothConnect.isGranted &&
|
||||
await Permission.location.isGranted;
|
||||
|
||||
if (!alreadyGranted) {
|
||||
// 弹出自定义提示
|
||||
showPermissionInfoDialog(
|
||||
Get.context!, CommonVariables().permissionInfo);
|
||||
dialogShown = true;
|
||||
|
||||
await Future.delayed(const Duration(milliseconds: 300));
|
||||
|
||||
// 请求权限
|
||||
statuses = await [
|
||||
Permission.bluetoothScan,
|
||||
Permission.bluetoothConnect,
|
||||
Permission.location,
|
||||
].request();
|
||||
|
||||
ef.log("权限状态: $statuses");
|
||||
} else {
|
||||
statuses = {
|
||||
Permission.bluetoothScan: PermissionStatus.granted,
|
||||
Permission.bluetoothConnect: PermissionStatus.granted,
|
||||
Permission.location: PermissionStatus.granted,
|
||||
};
|
||||
}
|
||||
} catch (e) {
|
||||
ef.log("申请权限出错: $e");
|
||||
} finally {
|
||||
// 只有真的弹过提示才关闭
|
||||
if (dialogShown && Get.context != null) {
|
||||
Navigator.of(Get.context!, rootNavigator: true).pop();
|
||||
}
|
||||
}
|
||||
|
||||
bool allGranted = statuses[Permission.bluetoothScan]?.isGranted == true &&
|
||||
statuses[Permission.bluetoothConnect]?.isGranted == true &&
|
||||
|
||||
@@ -253,7 +253,7 @@ class _MhtSleepReportPageState extends State<MhtSleepReportPage> {
|
||||
}
|
||||
return Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
0.rpx, 40.rpx, 30.rpx, 40.rpx),
|
||||
0.rpx, 10.rpx, 30.rpx, 0.rpx),
|
||||
child: Container(
|
||||
width: MediaQuery.sizeOf(context).width,
|
||||
constraints: BoxConstraints(
|
||||
@@ -265,7 +265,7 @@ class _MhtSleepReportPageState extends State<MhtSleepReportPage> {
|
||||
),
|
||||
child: Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
30.rpx, 16.rpx, 0.rpx, 25.rpx),
|
||||
20.rpx, 16.rpx, 0.rpx, 20.rpx),
|
||||
child: Container(
|
||||
width: MediaQuery.sizeOf(context).width,
|
||||
child: Row(
|
||||
@@ -273,16 +273,6 @@ class _MhtSleepReportPageState extends State<MhtSleepReportPage> {
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
// Text(
|
||||
// '健康报告'.tr,
|
||||
// style: TextStyle(
|
||||
// fontFamily: 'Readex Pro',
|
||||
// color:
|
||||
// themeController.currentColor.sc3,
|
||||
// letterSpacing: 0,
|
||||
// fontSize: 30.rpx,
|
||||
// ),
|
||||
// ),
|
||||
ScrollbarTheme(
|
||||
data: ScrollbarThemeData(
|
||||
thumbColor: MaterialStateProperty.all(
|
||||
@@ -379,8 +369,13 @@ class _MhtSleepReportPageState extends State<MhtSleepReportPage> {
|
||||
.updateAll();
|
||||
}
|
||||
},
|
||||
width: 300.rpx,
|
||||
height: 81.rpx,
|
||||
// width: 260.rpx,
|
||||
width:
|
||||
MediaQuery.of(context)
|
||||
.size
|
||||
.width *
|
||||
0.5,
|
||||
height: 53.rpx,
|
||||
maxHeight: 300.rpx,
|
||||
textStyle: TextStyle(
|
||||
fontSize: 28.rpx,
|
||||
@@ -495,6 +490,9 @@ class _MhtSleepReportPageState extends State<MhtSleepReportPage> {
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
children: [
|
||||
SizedBox(
|
||||
height: 30.rpx,
|
||||
),
|
||||
getTimeWidget(), // 始终显示
|
||||
isLoading.value
|
||||
? Padding(
|
||||
|
||||
@@ -14,6 +14,7 @@ import 'package:vbvs_app/common/util/MyUtils.dart';
|
||||
import 'package:vbvs_app/common/util/requestWithLog.dart';
|
||||
import 'package:vbvs_app/controller/user_info_controller.dart';
|
||||
import 'package:vbvs_app/model/WebSocketMessage.dart';
|
||||
import 'package:vbvs_app/pages/main_bottom/component/main_page_b_bottom_change.dart';
|
||||
import 'package:vbvs_app/pages/mh_page/device/controller/mht_bluetooth_controller.dart';
|
||||
import 'package:vbvs_app/pages/mh_page/homepage/controller/mht_home_controller.dart';
|
||||
|
||||
@@ -537,7 +538,9 @@ class WebviewTestView extends GetComponent<WebviewTestController> {
|
||||
child: Align(
|
||||
alignment: Alignment.topLeft,
|
||||
child: Obx(() {
|
||||
return (controller.ready.value)
|
||||
int? aa = MainPageBBottomChange.getCurrentIndex();
|
||||
print(aa);
|
||||
return (controller.ready.value && (MainPageBBottomChange.getCurrentIndex() == 2))
|
||||
? controller.web.build()
|
||||
: Center(child: CircularProgressIndicator());
|
||||
}),
|
||||
|
||||
@@ -107,7 +107,7 @@ class _VitalSignsWidgetState extends State<VitalSignsWidget> {
|
||||
),
|
||||
child: Padding(
|
||||
padding:
|
||||
EdgeInsetsDirectional.fromSTEB(26.rpx, 29.rpx, 26.rpx, 45.rpx),
|
||||
EdgeInsetsDirectional.fromSTEB(26.rpx, 10.rpx, 26.rpx, 45.rpx),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
@@ -115,55 +115,84 @@ class _VitalSignsWidgetState extends State<VitalSignsWidget> {
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
"生命体征".tr,
|
||||
style: TextStyle(
|
||||
color: themeController.currentColor.sc3,
|
||||
fontSize: AppConstants().title_text_fontSize),
|
||||
),
|
||||
ClickableContainer(
|
||||
backgroundColor: Colors.transparent,
|
||||
highlightColor: Colors.white, // 或设置为你需要的水波纹颜色
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
14.rpx, 0.rpx, 14.rpx, 0), //
|
||||
borderRadius: 0.rpx, // 圆形点击区域
|
||||
onTap: () {
|
||||
showTipDialog(
|
||||
context,
|
||||
Container(
|
||||
child: Text(
|
||||
"生命体征指的是睡眠周期的整体数据。".tr,
|
||||
style: TextStyle(
|
||||
fontSize: 26.rpx,
|
||||
color: Colors.black,
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"生命体征".tr,
|
||||
style: TextStyle(
|
||||
color: themeController.currentColor.sc3,
|
||||
fontSize: AppConstants().title_text_fontSize),
|
||||
),
|
||||
ClickableContainer(
|
||||
backgroundColor: Colors.transparent,
|
||||
highlightColor: Colors.white, // 或设置为你需要的水波纹颜色
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
14.rpx, 0.rpx, 14.rpx, 0), //
|
||||
borderRadius: 0.rpx, // 圆形点击区域
|
||||
onTap: () {
|
||||
showTipDialog(
|
||||
context,
|
||||
Container(
|
||||
child: Text(
|
||||
"生命体征指的是睡眠周期的整体数据。".tr,
|
||||
style: TextStyle(
|
||||
fontSize: 26.rpx,
|
||||
color: Colors.black,
|
||||
),
|
||||
),
|
||||
),
|
||||
backgroundColor: Color(0xFFFFFFFF),
|
||||
colors: [
|
||||
Color(0XFF1592AA),
|
||||
Color(0xFF0C83A7),
|
||||
Color(0xFF006FA3)
|
||||
],
|
||||
);
|
||||
},
|
||||
child: Container(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
0, 0.rpx, 0.rpx, 0), // 外部 padding 移到内部
|
||||
width: 28.rpx,
|
||||
height: 28.rpx,
|
||||
child: SvgPicture.asset(
|
||||
'assets/img/icon/explain.svg',
|
||||
fit: BoxFit.cover,
|
||||
color: themeController.currentColor.sc4,
|
||||
),
|
||||
),
|
||||
backgroundColor: Color(0xFFFFFFFF),
|
||||
colors: [
|
||||
Color(0XFF1592AA),
|
||||
Color(0xFF0C83A7),
|
||||
Color(0xFF006FA3)
|
||||
],
|
||||
);
|
||||
},
|
||||
child: Container(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
0, 0.rpx, 0.rpx, 0), // 外部 padding 移到内部
|
||||
width: 28.rpx,
|
||||
height: 28.rpx,
|
||||
child: SvgPicture.asset(
|
||||
'assets/img/icon/explain.svg',
|
||||
fit: BoxFit.cover,
|
||||
color: themeController.currentColor.sc4,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
Row(mainAxisAlignment: MainAxisAlignment.end, children: [
|
||||
OutlinedButton(
|
||||
onPressed: () {
|
||||
MHTHomeController homeController = Get.find();
|
||||
Get.toNamed("/newSleepReportPage", arguments: {
|
||||
'date': widget.sleepReport['endTime'],
|
||||
"mac": homeController.selectDevcie.value,
|
||||
'type': 1,
|
||||
'backgroundImg': 'assets/images/new_background.png',
|
||||
'person_show': false,
|
||||
'itemName': 206,
|
||||
});
|
||||
},
|
||||
style: OutlinedButton.styleFrom(
|
||||
side: const BorderSide(color: Color(0XFF85F5FF)),
|
||||
foregroundColor: Color(0XFF85F5FF),
|
||||
minimumSize: Size(202.rpx, 62.rpx),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(6),
|
||||
),
|
||||
),
|
||||
child: Text('查看详情'.tr),
|
||||
),
|
||||
])
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: 98.rpx,
|
||||
height: 40.rpx,
|
||||
),
|
||||
Row(
|
||||
children: List.generate(3, (index) {
|
||||
@@ -215,33 +244,9 @@ class _VitalSignsWidgetState extends State<VitalSignsWidget> {
|
||||
);
|
||||
}),
|
||||
),
|
||||
SizedBox(
|
||||
height: 130.rpx,
|
||||
),
|
||||
Row(mainAxisAlignment: MainAxisAlignment.end, children: [
|
||||
OutlinedButton(
|
||||
onPressed: () {
|
||||
MHTHomeController homeController = Get.find();
|
||||
Get.toNamed("/newSleepReportPage", arguments: {
|
||||
'date': widget.sleepReport['endTime'],
|
||||
"mac": homeController.selectDevcie.value,
|
||||
'type': 1,
|
||||
'backgroundImg': 'assets/images/new_background.png',
|
||||
'person_show': false,
|
||||
'itemName': 206,
|
||||
});
|
||||
},
|
||||
style: OutlinedButton.styleFrom(
|
||||
side: const BorderSide(color: Color(0XFF85F5FF)),
|
||||
foregroundColor: Color(0XFF85F5FF),
|
||||
minimumSize: Size(202.rpx, 62.rpx),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(6),
|
||||
),
|
||||
),
|
||||
child: Text('查看详情'.tr),
|
||||
),
|
||||
])
|
||||
// SizedBox(
|
||||
// height: 130.rpx,
|
||||
// ),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@@ -95,7 +95,7 @@ class _NewSleepViewWidgetState extends State<NewSleepViewWidget> {
|
||||
),
|
||||
child: Padding(
|
||||
padding:
|
||||
EdgeInsetsDirectional.fromSTEB(26.rpx, 29.rpx, 26.rpx, 45.rpx),
|
||||
EdgeInsetsDirectional.fromSTEB(26.rpx, 10.rpx, 26.rpx, 44.rpx),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
@@ -103,51 +103,79 @@ class _NewSleepViewWidgetState extends State<NewSleepViewWidget> {
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
"睡眠规律性".tr,
|
||||
style: TextStyle(
|
||||
color: themeController.currentColor.sc3,
|
||||
fontSize: AppConstants().title_text_fontSize),
|
||||
),
|
||||
ClickableContainer(
|
||||
backgroundColor: Colors.transparent,
|
||||
highlightColor: Colors.white, // 或设置为你需要的水波纹颜色
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
14.rpx, 0.rpx, 14.rpx, 0), //
|
||||
borderRadius: 0.rpx, // 圆形点击区域
|
||||
onTap: () {
|
||||
showTipDialog(
|
||||
context,
|
||||
Container(
|
||||
child: Text(
|
||||
"睡眠规律性是指个体睡眠模式在时间、时长、环境等方面呈现出的稳定性和一致性,是衡量睡眠质量的重要指标之一。"
|
||||
.tr,
|
||||
style: TextStyle(
|
||||
fontSize: 26.rpx,
|
||||
color: Colors.black,
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
"睡眠规律性".tr,
|
||||
style: TextStyle(
|
||||
color: themeController.currentColor.sc3,
|
||||
fontSize: AppConstants().title_text_fontSize),
|
||||
),
|
||||
ClickableContainer(
|
||||
backgroundColor: Colors.transparent,
|
||||
highlightColor: Colors.white, // 或设置为你需要的水波纹颜色
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
14.rpx, 0.rpx, 14.rpx, 0), //
|
||||
borderRadius: 0.rpx, // 圆形点击区域
|
||||
onTap: () {
|
||||
showTipDialog(
|
||||
context,
|
||||
Container(
|
||||
child: Text(
|
||||
"睡眠规律性是指个体睡眠模式在时间、时长、环境等方面呈现出的稳定性和一致性,是衡量睡眠质量的重要指标之一。"
|
||||
.tr,
|
||||
style: TextStyle(
|
||||
fontSize: 26.rpx,
|
||||
color: Colors.black,
|
||||
),
|
||||
),
|
||||
),
|
||||
backgroundColor: Color(0xFFFFFFFF),
|
||||
colors: [
|
||||
Color(0XFF1592AA),
|
||||
Color(0xFF0C83A7),
|
||||
Color(0xFF006FA3)
|
||||
],
|
||||
);
|
||||
},
|
||||
child: Container(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
0, 0.rpx, 0.rpx, 0), // 外部 padding 移到内部
|
||||
width: 28.rpx,
|
||||
height: 28.rpx,
|
||||
child: SvgPicture.asset(
|
||||
'assets/img/icon/explain.svg',
|
||||
fit: BoxFit.cover,
|
||||
color: themeController.currentColor.sc4,
|
||||
),
|
||||
),
|
||||
backgroundColor: Color(0xFFFFFFFF),
|
||||
colors: [
|
||||
Color(0XFF1592AA),
|
||||
Color(0xFF0C83A7),
|
||||
Color(0xFF006FA3)
|
||||
],
|
||||
);
|
||||
},
|
||||
child: Container(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
0, 0.rpx, 0.rpx, 0), // 外部 padding 移到内部
|
||||
width: 28.rpx,
|
||||
height: 28.rpx,
|
||||
child: SvgPicture.asset(
|
||||
'assets/img/icon/explain.svg',
|
||||
fit: BoxFit.cover,
|
||||
color: themeController.currentColor.sc4,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
Row(mainAxisAlignment: MainAxisAlignment.end, children: [
|
||||
OutlinedButton(
|
||||
onPressed: () {
|
||||
MHTHomeController homeController = Get.find();
|
||||
Get.toNamed("/newSleepReportPage", arguments: {
|
||||
'date': widget.sleepReport['endTime'],
|
||||
"mac": homeController.selectDevcie.value,
|
||||
'type': 1,
|
||||
'backgroundImg': 'assets/images/new_background.png',
|
||||
'person_show': false,
|
||||
});
|
||||
},
|
||||
style: OutlinedButton.styleFrom(
|
||||
side: const BorderSide(color: Color(0XFF85F5FF)),
|
||||
foregroundColor: Color(0XFF85F5FF),
|
||||
minimumSize: Size(202.rpx, 62.rpx),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(6),
|
||||
),
|
||||
),
|
||||
child: Text('查看详情'.tr),
|
||||
),
|
||||
])
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -173,7 +201,7 @@ class _NewSleepViewWidgetState extends State<NewSleepViewWidget> {
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: 70.rpx,
|
||||
height: 62.rpx,
|
||||
),
|
||||
// Wrap(
|
||||
// spacing: 55.rpx,
|
||||
@@ -252,30 +280,6 @@ class _NewSleepViewWidgetState extends State<NewSleepViewWidget> {
|
||||
);
|
||||
}).toList(),
|
||||
),
|
||||
|
||||
Row(mainAxisAlignment: MainAxisAlignment.end, children: [
|
||||
OutlinedButton(
|
||||
onPressed: () {
|
||||
MHTHomeController homeController = Get.find();
|
||||
Get.toNamed("/newSleepReportPage", arguments: {
|
||||
'date': widget.sleepReport['endTime'],
|
||||
"mac": homeController.selectDevcie.value,
|
||||
'type': 1,
|
||||
'backgroundImg': 'assets/images/new_background.png',
|
||||
'person_show': false,
|
||||
});
|
||||
},
|
||||
style: OutlinedButton.styleFrom(
|
||||
side: const BorderSide(color: Color(0XFF85F5FF)),
|
||||
foregroundColor: Color(0XFF85F5FF),
|
||||
minimumSize: Size(202.rpx, 62.rpx),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(6),
|
||||
),
|
||||
),
|
||||
child: Text('查看详情'.tr),
|
||||
),
|
||||
])
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user