Commit 47ea47f1 authored by akari's avatar akari

fix: 设置第2页显示

parent 3dde4595
......@@ -47,19 +47,16 @@ class DeviceControlPanelFrame extends StatelessWidget {
),
border: backgroundAsset == null
? Border.all(
color: active
? const Color(0xFF3EFF5F)
: const Color(0xFF89DFFF),
color:
active ? const Color(0xFF3EFF5F) : const Color(0xFF89DFFF),
width: 3.w,
)
: null,
borderRadius: BorderRadius.circular(8.r),
boxShadow: [
BoxShadow(
color: (active
? const Color(0xFF3EFF5F)
: const Color(0xFF4FC8FF))
.withValues(alpha: 0.32),
color: (active ? const Color(0xFF3EFF5F) : const Color(0xFF4FC8FF))
.withValues(alpha: 0.32),
blurRadius: 18.r,
spreadRadius: 2.r,
),
......@@ -117,12 +114,18 @@ class DeviceControlPill extends StatelessWidget {
),
borderRadius: BorderRadius.circular(20.r),
),
child: Text(
text,
style: TextStyle(
color: active ? const Color(0xFF52FFBB) : const Color(0xFF75C1DD),
fontSize: 22.sp,
fontWeight: FontWeight.w700,
child: GestureDetector(
onTap: () {
var key = super.key;
debugPrint("test $key");
},
child: Text(
text,
style: TextStyle(
color: active ? const Color(0xFF52FFBB) : const Color(0xFF75C1DD),
fontSize: 22.sp,
fontWeight: FontWeight.w700,
),
),
),
);
......
......@@ -60,35 +60,48 @@ class MonitoringMetricCard extends StatelessWidget {
Expanded(
flex: 2,
child: Align(
alignment: Alignment.topLeft,
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),),
)
alignment: Alignment.topLeft,
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,
// ),
),
// 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,
// ),
),
),
],
),
......
......@@ -2,14 +2,13 @@ import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:laki_icu_app/utils/numeric_keyboard.dart';
import 'package:laki_icu_app/utils/toast_utils.dart';
import '../../widgets/settings_panel_frame.dart';
import '../cubit/factory_settings_index_cubit.dart';
const bool _enableCalibrationEditing = false;
const bool _showCalibrationInitButton = false;
const bool _showCalibrationApplyButton = false;
const bool _enableCalibrationEditing = true;
const bool _showCalibrationInitButton = true;
const bool _showCalibrationApplyButton = true;
class FactoryDeviceCalibrationPanel extends StatefulWidget {
const FactoryDeviceCalibrationPanel({super.key});
......@@ -52,7 +51,7 @@ class _FactoryDeviceCalibrationPanelState
}
void _applyChanges() {
showToast('操作成功');
// UI placeholder only. Real calibration persistence will be wired later.
}
@override
......
......@@ -8,8 +8,8 @@ import '../cubit/factory_settings_index_cubit.dart';
import '../cubit/factory_settings_index_state.dart';
import 'factory_device_calibration_panel.dart';
const bool _showFactoryCalibrationEntry = false;
const bool _showFactoryInitEntry = false;
const bool _showFactoryCalibrationEntry = true;
const bool _showFactoryInitEntry = true;
class FactorySettingsPanel extends StatelessWidget {
const FactorySettingsPanel({super.key});
......@@ -143,10 +143,7 @@ class _FactoryActionColumn extends StatelessWidget {
if (_showFactoryCalibrationEntry && _showFactoryInitEntry)
SizedBox(height: 28.h),
if (_showFactoryInitEntry)
_WideFactoryButton(
text: '初始化设置',
onPressed: () => const {},
),
const _WideFactoryButton(text: '初始化设置'),
],
),
),
......
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