Commit a74d7559 authored by 张宏's avatar 张宏

22222222

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