完成修复远程控制页面中点火的状态值不一致问题
This commit is contained in:
@@ -98,7 +98,7 @@ class CenterControlArea extends StatelessWidget {
|
|||||||
svgEnd: "assets/svgs/remote_down.svg",
|
svgEnd: "assets/svgs/remote_down.svg",
|
||||||
onStart: () => _handleSliderAction(label, "start", context),
|
onStart: () => _handleSliderAction(label, "start", context),
|
||||||
onCenter: () => _handleSliderAction(label, "center", context),
|
onCenter: () => _handleSliderAction(label, "center", context),
|
||||||
onEnd: () => debugPrint("$label end"),
|
onEnd: () => _handleSliderAction(label, "end", context),
|
||||||
iconSize: boxWidth * 0.6 * 0.35,
|
iconSize: boxWidth * 0.6 * 0.35,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -232,7 +232,7 @@ class TopStatusBar extends StatelessWidget {
|
|||||||
height: boxWidth, // 旋转后对应原宽度(足够长,不拥挤)
|
height: boxWidth, // 旋转后对应原宽度(足够长,不拥挤)
|
||||||
child: CCExpandSlider(
|
child: CCExpandSlider(
|
||||||
label: " ",
|
label: " ",
|
||||||
// 3. 图标适配旋转后的方向(仍用上下箭头,旋转后变为左右)
|
// 3. 图标适配旋转后的方向(仍用上下箭头,旋转后变为左右)因为外边旋转了 90度 参数传递也要转换
|
||||||
svgStart: "assets/svgs/remote_flame_minus.svg", // 旋转后→左箭头
|
svgStart: "assets/svgs/remote_flame_minus.svg", // 旋转后→左箭头
|
||||||
svgCenter: "assets/svgs/remote_flame.svg",
|
svgCenter: "assets/svgs/remote_flame.svg",
|
||||||
svgEnd: "assets/svgs/remote_flame_plus.svg", // 旋转后→右箭头
|
svgEnd: "assets/svgs/remote_flame_plus.svg", // 旋转后→右箭头
|
||||||
@@ -241,7 +241,7 @@ class TopStatusBar extends StatelessWidget {
|
|||||||
// 保留原有业务逻辑
|
// 保留原有业务逻辑
|
||||||
onStart: () => _handleSliderAction(label, "start", context),
|
onStart: () => _handleSliderAction(label, "start", context),
|
||||||
onCenter: () => _handleSliderAction(label, "center", context),
|
onCenter: () => _handleSliderAction(label, "center", context),
|
||||||
onEnd: () => debugPrint("$label end"),
|
onEnd: () => _handleSliderAction(label, "end", context),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -262,19 +262,19 @@ class TopStatusBar extends StatelessWidget {
|
|||||||
|
|
||||||
switch (action) {
|
switch (action) {
|
||||||
case "start":
|
case "start":
|
||||||
debugPrint('⬆点火啊');
|
debugPrint('2熄火');
|
||||||
// TODO: 发送 🔥点火指令
|
// TODO: 发送 🔥点火指令
|
||||||
cubit.sendFireCommand(1);
|
cubit.sendFireCommand(2);
|
||||||
break;
|
break;
|
||||||
case "center":
|
case "center":
|
||||||
debugPrint('️熄火');
|
debugPrint('️0熄火');
|
||||||
// TODO: 发送点火停止指令
|
// TODO: 发送点火停止指令
|
||||||
cubit.sendFireCommand(0);
|
cubit.sendFireCommand(0);
|
||||||
break;
|
break;
|
||||||
case "end":
|
case "end":
|
||||||
debugPrint('⬇熄火)');
|
debugPrint('1点火)');
|
||||||
// TODO: 发送熄火后退指令
|
// TODO: 发送熄火后退指令
|
||||||
cubit.sendFireCommand(2);
|
cubit.sendFireCommand(1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user