Skip to content

Commit

Permalink
mod: 调整平板、折叠屏内屏、普通手机横屏尺寸,状态栏动态恢复
Browse files Browse the repository at this point in the history
  • Loading branch information
orz12 committed Feb 11, 2024
1 parent 0d1f738 commit 7fb22a4
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions lib/pages/video/detail/view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ class _VideoDetailPageState extends State<VideoDetailPage>
videoPlayerServiceHandler.onVideoDetailDispose();
floating.dispose();
_lifecycleListener.dispose();
exitFullScreen();
super.dispose();
}

Expand Down Expand Up @@ -580,7 +581,13 @@ class _VideoDetailPageState extends State<VideoDetailPage>
),
),
body: Obx(() {
final double videoheight = Get.height * 0.32 + Get.width * 0.13;
// 系数是以下三个方程(分别代表特定平板、折叠屏内屏、普通手机横屏尺寸)的近似解
// 820x+1180y+967600z=450,
// 1812x+2176y+3942912z=780,
// 1080x+2340y+2527200z=500
final double videoheight = Get.height * 0.5999 +
Get.width * 0.05172 -
Get.height * Get.width * 1.064e-4;
final double videowidth = videoheight * 16 / 9;
return Row(
children: [
Expand Down Expand Up @@ -742,7 +749,10 @@ class _VideoDetailPageState extends State<VideoDetailPage>
: 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(
Expand All @@ -762,7 +772,9 @@ class _VideoDetailPageState extends State<VideoDetailPage>
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: <Widget>[
Expand Down

0 comments on commit 7fb22a4

Please sign in to comment.