USB 摄像头+远程遥控+中英的适配+topic的集成和状态的使用到相应页面
This commit is contained in:
@@ -28,19 +28,23 @@ class _LeftJoystickAreaState extends State<LeftJoystickArea> {
|
||||
|
||||
/// 检查是否可以控制,不能则弹出提示
|
||||
bool _checkCanControl(BuildContext context) {
|
||||
final cubit = context.read<RemoteControlCubit>();
|
||||
if (!cubit.isStatusPushActive()) {
|
||||
if (!_hasShownNoPushDialog) {
|
||||
_hasShownNoPushDialog = true;
|
||||
_showNoStatusPushDialog(context);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
_hasShownNoPushDialog = false;
|
||||
// 🔥 临时关闭「未收到推送不能控制」门槛,便于机器未开时用 Mock 假数据联调倒车影像。
|
||||
// 联调完成后取消下面注释即可恢复。切勿删除本段逻辑。
|
||||
// final cubit = context.read<RemoteControlCubit>();
|
||||
// if (!cubit.isStatusPushActive()) {
|
||||
// if (!_hasShownNoPushDialog) {
|
||||
// _hasShownNoPushDialog = true;
|
||||
// _showNoStatusPushDialog(context);
|
||||
// }
|
||||
// return false;
|
||||
// }
|
||||
// _hasShownNoPushDialog = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
/// 显示暂未收到推送的提示弹窗(小圆角)
|
||||
/// 🔥 门槛已临时注释,本方法暂未被调用:保留勿删,恢复门槛后即生效。
|
||||
// ignore: unused_element
|
||||
void _showNoStatusPushDialog(BuildContext context) {
|
||||
showDialog(
|
||||
context: context,
|
||||
|
||||
Reference in New Issue
Block a user