From d996e0a7dd659aff3f250d780c73ba1ad238fa24 Mon Sep 17 00:00:00 2001 From: bggRGjQaUbCoE Date: Wed, 12 Feb 2025 21:31:06 +0800 Subject: [PATCH] fix: #240 Signed-off-by: bggRGjQaUbCoE --- lib/pages/live_room/view.dart | 44 ++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/lib/pages/live_room/view.dart b/lib/pages/live_room/view.dart index 200fa30c5..5a911d605 100644 --- a/lib/pages/live_room/view.dart +++ b/lib/pages/live_room/view.dart @@ -313,28 +313,30 @@ class _LiveRoomPageState extends State }, ), ), - PopScope( - canPop: plPlayerController.isFullScreen.value != true, - onPopInvokedWithResult: (bool didPop, Object? result) { - if (plPlayerController.isFullScreen.value == true) { - plPlayerController.triggerFullScreen(status: false); - // if (MediaQuery.of(context).orientation == - // Orientation.landscape) { - // verticalScreenForTwoSeconds(); - // } - } - }, - child: Listener( - onPointerDown: (_) { - _node.unfocus(); + Obx( + () => PopScope( + canPop: plPlayerController.isFullScreen.value != true, + onPopInvokedWithResult: (bool didPop, Object? result) { + if (plPlayerController.isFullScreen.value == true) { + plPlayerController.triggerFullScreen(status: false); + // if (MediaQuery.of(context).orientation == + // Orientation.landscape) { + // verticalScreenForTwoSeconds(); + // } + } }, - child: SizedBox( - width: Get.size.width, - height: MediaQuery.of(context).orientation == - Orientation.landscape - ? Get.size.height - : Get.size.width * 9 / 16, - child: videoPlayerPanel, + child: Listener( + onPointerDown: (_) { + _node.unfocus(); + }, + child: SizedBox( + width: Get.size.width, + height: MediaQuery.of(context).orientation == + Orientation.landscape + ? Get.size.height + : Get.size.width * 9 / 16, + child: videoPlayerPanel, + ), ), ), ),