路径规划孔洞和 远程遥控视频切换

This commit is contained in:
mmc
2026-03-20 11:20:09 +08:00
parent bb22de2e32
commit 95c7d02415
3 changed files with 41 additions and 119 deletions

View File

@@ -82,6 +82,7 @@ class _RemoteControlPageState extends State<RemoteControlPage> {
streamUrl: _videoStreamUrl,
showLeftPip: state.showLeftPip, // 从 Cubit 状态中读取
showRightPip: state.showRightPip, // 从 Cubit 状态中读取
isFrontMain: context.watch<RemoteControlCubit>().state.controlEntity.originY>= 0.5,
);
},
),
@@ -192,21 +193,21 @@ class _RemoteControlPageState extends State<RemoteControlPage> {
color: Colors.black54,
child: AlertDialog(
title: const Text("权限变更"),
// content: Text("${state.permissionPlatform}端正请求控制权,同意释放吗?"),
// content: Text("${state.permissionPlatform}端正请求控制权,同意释放吗?"),
content: Text("web端正请求控制权,同意释放吗?"),
actions: [
TextButton(onPressed: () => context.read<RemoteControlCubit>().respondPermission(false,deviceId), child: const Text("拒绝")),
TextButton(onPressed: () => context.read<RemoteControlCubit>().respondPermission(false, deviceId), child: const Text("拒绝")),
TextButton(
onPressed: () {
context.read<RemoteControlCubit>().respondPermission(true, deviceId);
// 🔥 用户同意,延迟跳转到首页
// Future.delayed(const Duration(milliseconds: 1000), () {
// if (context.mounted) {
// context.go(RoutePaths.home);
// }
// });
},
child: const Text("同意"),
onPressed: () {
context.read<RemoteControlCubit>().respondPermission(true, deviceId);
// 🔥 用户同意,延迟跳转到首页
// Future.delayed(const Duration(milliseconds: 1000), () {
// if (context.mounted) {
// context.go(RoutePaths.home);
// }
// });
},
child: const Text("同意"),
),
],
),