Commit a74d7559 authored by 张宏's avatar 张宏

22222222

parent d1e20f66
......@@ -28,10 +28,6 @@ public class CrashHandler implements UncaughtExceptionHandler {
@Override
public void uncaughtException(Thread arg0, Throwable arg1) {
// TODO: 崩溃日志记录 — 后期确定方案后补充
// 可选方向:
// A. 写本地文件 (参考 qisuanfa: context.getExternalFilesDir + yyyy-MM-dd/errorLog.log)
// B. 接入第三方平台 (Bugly / Sentry / Firebase Crashlytics)
// C. 通过 Flutter MethodChannel 回传 Dart 层统一处理
// 待确定后再实现。
// TODO: 崩溃上报 — 同上,后期确定上报通道后补充
......
......@@ -16,8 +16,8 @@ import com.qialg.laki_icu_app.MainActivity;
*/
public class WatchDogManager {
private static final String TAG = "WatchDogManager";
private static final int TIMEOUT = 10000; // 10秒没响应判定为卡死
private static final int CHECK_INTERVAL = 3000; // 每3秒检查一次
private static final int TIMEOUT = 30000; // 30秒没响应判定为卡死
private static final int CHECK_INTERVAL = 5000; // 每3秒检查一次
private static volatile long lastResponseTime;
private static Handler mainHandler;
......
......@@ -61,16 +61,33 @@ class MonitoringMetricCard extends StatelessWidget {
flex: 2,
child: Align(
alignment: Alignment.topLeft,
child: FlutterSwitch(
width: 60.w,
height: 30.h,
value: switchValue,
onToggle: onSwitchToggle ?? (_) {},
activeColor: const Color(0xFF75C1DD),
inactiveColor: const Color(0xFF0A1B34),
toggleSize: 22.w,
padding: 4.w,
),
child: displayLabel == 'CO₂浓度' ? Container(
child: Text("PPM",style: TextStyle(color: Color(0xFF66C0E8),fontSize: 24.sp,fontWeight: FontWeight.bold),),
) : Container(
width: 93.w,
height: 41.h,
alignment: AlignmentDirectional.center,
decoration: BoxDecoration(
color: Color(0xFF0A1B34),
border: BoxBorder.all(
width: 1.w,
color: Color(0xFF5A8BB0),
),
borderRadius: BorderRadius.circular(20)
),
child: Text("ON",style: TextStyle(color: Color(0xFF3C6082),fontSize: 24.sp,fontWeight: FontWeight.bold),),
)
// FlutterSwitch(
// width: 60.w,
// height: 30.h,
// value: switchValue,
// onToggle: onSwitchToggle ?? (_) {},
// activeColor: const Color(0xFF75C1DD),
// inactiveColor: const Color(0xFF0A1B34),
// toggleSize: 22.w,
// padding: 4.w,
// ),
),
),
],
......
......@@ -122,38 +122,38 @@ class MonitoringPetInfoCard extends StatelessWidget {
),
SizedBox(height: 26.h),
// 绑定宠物按钮
GestureDetector(
onTap: onBindPet,
child: Container(
width: double.infinity,
height: 140.h,
decoration: const BoxDecoration(
image: DecorationImage(
image:
AssetImage('lib/assets/monitoring/title_bg_spacewalk.png'),
fit: BoxFit.fill,
),
),
child: Center(
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
SizedBox(width: 24.w),
Text(
'绑定宠物',
style: TextStyle(
color: Colors.white,
fontSize: 32.sp,
fontWeight: FontWeight.w700,
letterSpacing: 4.w,
),
),
SizedBox(width: 24.w),
],
),
),
),
),
// GestureDetector(
// onTap: onBindPet,
// child: Container(
// width: double.infinity,
// height: 140.h,
// decoration: const BoxDecoration(
// image: DecorationImage(
// image:
// AssetImage('lib/assets/monitoring/title_bg_spacewalk.png'),
// fit: BoxFit.fill,
// ),
// ),
// child: Center(
// child: Row(
// mainAxisAlignment: MainAxisAlignment.center,
// children: [
// SizedBox(width: 24.w),
// Text(
// '绑定宠物',
// style: TextStyle(
// color: Colors.white,
// fontSize: 32.sp,
// fontWeight: FontWeight.w700,
// letterSpacing: 4.w,
// ),
// ),
// SizedBox(width: 24.w),
// ],
// ),
// ),
// ),
// ),
],
);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment