Commit 47ea47f1 authored by akari's avatar akari

fix: 设置第2页显示

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