From d1ed6eb785d0fc516a026fd5820340ad95bf33b1 Mon Sep 17 00:00:00 2001 From: orz12 Date: Sun, 11 Feb 2024 21:51:34 +0800 Subject: [PATCH] =?UTF-8?q?mod:=20=E8=B0=83=E6=95=B4=E5=B9=B3=E6=9D=BF?= =?UTF-8?q?=E3=80=81=E6=8A=98=E5=8F=A0=E5=B1=8F=E5=86=85=E5=B1=8F=E3=80=81?= =?UTF-8?q?=E6=99=AE=E9=80=9A=E6=89=8B=E6=9C=BA=E6=A8=AA=E5=B1=8F=E5=B0=BA?= =?UTF-8?q?=E5=AF=B8=EF=BC=8C=E7=8A=B6=E6=80=81=E6=A0=8F=E5=8A=A8=E6=80=81?= =?UTF-8?q?=E6=81=A2=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/video/detail/view.dart | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/lib/pages/video/detail/view.dart b/lib/pages/video/detail/view.dart index 3ea5a8e24..52dc04f7d 100644 --- a/lib/pages/video/detail/view.dart +++ b/lib/pages/video/detail/view.dart @@ -1,5 +1,6 @@ import 'dart:async'; import 'dart:io'; +import 'dart:math'; import 'dart:ui'; import 'package:extended_nested_scroll_view/extended_nested_scroll_view.dart'; @@ -208,6 +209,7 @@ class _VideoDetailPageState extends State videoPlayerServiceHandler.onVideoDetailDispose(); floating.dispose(); _lifecycleListener.dispose(); + exitFullScreen(); super.dispose(); } @@ -580,7 +582,14 @@ class _VideoDetailPageState extends State ), ), body: Obx(() { - final double videoheight = Get.height * 0.32 + Get.width * 0.13; + // 系数是以下三个方程(分别代表特定平板、折叠屏内屏、普通手机横屏尺寸)的近似解 + // 820x+1180y+983.67z=450 + // 1812x+2176y+1985.68z=680 + // 1080x+2340y+1589.72z=540 + final double videoheight = + sqrt(Get.height * Get.width) * 12.972 - + Get.height * 7.928 - + Get.width * 4.923; final double videowidth = videoheight * 16 / 9; return Row( children: [ @@ -742,7 +751,10 @@ class _VideoDetailPageState extends State : videowidth, height: isFullScreen.value == true ? 0 - : Get.height - videoheight, + : Get.height - + videoheight - + MediaQuery.of(context).padding.top - + MediaQuery.of(context).padding.bottom, child: (videoDetailController.videoType == SearchType.video) ? const CustomScrollView( @@ -762,7 +774,9 @@ class _VideoDetailPageState extends State MediaQuery.of(context).padding.left - MediaQuery.of(context).padding.right - videowidth), - height: Get.height, + height: Get.height - + MediaQuery.of(context).padding.top - + MediaQuery.of(context).padding.bottom, child: TabBarView( controller: videoDetailController.tabCtr, children: [