This commit is contained in:
orz12
2024-06-17 01:26:52 +08:00
parent ff3484e4b5
commit 45aaa3d075
95 changed files with 282 additions and 282 deletions

View File

@@ -49,8 +49,8 @@ class _VideoDetailPageState extends State<VideoDetailPage>
PlayerStatus playerStatus = PlayerStatus.playing;
double doubleOffset = 0;
final Box<dynamic> localCache = GStrorage.localCache;
final Box<dynamic> setting = GStrorage.setting;
final Box<dynamic> localCache = GStorage.localCache;
final Box<dynamic> setting = GStorage.setting;
late Future _futureBuilderFuture;
// 自动退出全屏
late bool autoExitFullscreen;
@@ -487,12 +487,12 @@ class _VideoDetailPageState extends State<VideoDetailPage>
children: [
Obx(
() {
double videoheight = context.width * 9 / 16;
final double videowidth = context.width;
double videoHeight = context.width * 9 / 16;
final double videoWidth = context.width;
// print(videoDetailController.tabCtr.index);
if (enableVerticalExpand &&
plPlayerController?.direction.value == 'vertical') {
videoheight = context.width;
videoHeight = context.width;
}
if (MediaQuery.of(context).orientation ==
Orientation.landscape &&
@@ -521,7 +521,7 @@ class _VideoDetailPageState extends State<VideoDetailPage>
removeSafeArea
? 0
: MediaQuery.of(context).padding.top)
: videoheight,
: videoHeight,
width: context.width,
child: PopScope(
canPop: isFullScreen.value != true &&
@@ -562,8 +562,8 @@ class _VideoDetailPageState extends State<VideoDetailPage>
type: 'emote',
src: videoDetailController
.videoItem['pic'],
width: videowidth,
height: videoheight,
width: videoWidth,
height: videoHeight,
),
),
),
@@ -653,16 +653,16 @@ class _VideoDetailPageState extends State<VideoDetailPage>
Widget childWhenDisabledAlmostSquareInner = Obx(() {
if (enableVerticalExpand &&
plPlayerController?.direction.value == 'vertical') {
final double videoheight = context.height -
final double videoHeight = context.height -
(removeSafeArea
? 0
: (MediaQuery.of(context).padding.top +
MediaQuery.of(context).padding.bottom));
final double videowidth = videoheight * 9 / 16;
final double videoWidth = videoHeight * 9 / 16;
return Row(children: [
SizedBox(
height: videoheight,
width: isFullScreen.value == true ? context.width : videowidth,
height: videoHeight,
width: isFullScreen.value == true ? context.width : videoWidth,
child: PopScope(
canPop: isFullScreen.value != true,
onPopInvoked: (bool didPop) {
@@ -694,8 +694,8 @@ class _VideoDetailPageState extends State<VideoDetailPage>
child: NetworkImgLayer(
type: 'emote',
src: videoDetailController.videoItem['pic'],
width: videowidth,
height: videoheight,
width: videoWidth,
height: videoHeight,
),
),
),
@@ -745,19 +745,19 @@ class _VideoDetailPageState extends State<VideoDetailPage>
),
]);
}
final double videoheight = context.height / 2.5;
final double videowidth = context.width;
final double videoHeight = context.height / 2.5;
final double videoWidth = context.width;
return Column(
children: [
SizedBox(
width: videowidth,
width: videoWidth,
height: isFullScreen.value == true
? context.height -
(removeSafeArea
? 0
: (MediaQuery.of(context).padding.top +
MediaQuery.of(context).padding.bottom))
: videoheight,
: videoHeight,
child: PopScope(
canPop: isFullScreen.value != true,
onPopInvoked: (bool didPop) {
@@ -789,8 +789,8 @@ class _VideoDetailPageState extends State<VideoDetailPage>
child: NetworkImgLayer(
type: 'emote',
src: videoDetailController.videoItem['pic'],
width: videowidth,
height: videoheight,
width: videoWidth,
height: videoHeight,
),
),
),
@@ -833,14 +833,14 @@ class _VideoDetailPageState extends State<VideoDetailPage>
Widget childWhenDisabledLandscapeInner = Obx(() {
if (enableVerticalExpand &&
plPlayerController?.direction.value == 'vertical') {
final double videoheight = context.height -
final double videoHeight = context.height -
(removeSafeArea ? 0 : MediaQuery.of(context).padding.top);
final double videowidth = videoheight * 9 / 16;
final double videoWidth = videoHeight * 9 / 16;
return Row(
children: [
SizedBox(
height: videoheight,
width: isFullScreen.value == true ? context.width : videowidth,
height: videoHeight,
width: isFullScreen.value == true ? context.width : videoWidth,
child: PopScope(
canPop: isFullScreen.value != true,
onPopInvoked: (bool didPop) {
@@ -873,8 +873,8 @@ class _VideoDetailPageState extends State<VideoDetailPage>
child: NetworkImgLayer(
type: 'emote',
src: videoDetailController.videoItem['pic'],
width: videowidth,
height: videoheight,
width: videoWidth,
height: videoHeight,
),
),
),
@@ -951,18 +951,18 @@ class _VideoDetailPageState extends State<VideoDetailPage>
],
);
}
final double videowidth =
final double videoWidth =
max(context.height / context.width * 1.04, 1 / 2) * context.width;
final double videoheight = videowidth * 9 / 16;
final double videoHeight = videoWidth * 9 / 16;
return Row(
children: [
Column(
children: [
SizedBox(
width:
isFullScreen.value == true ? context.width : videowidth,
isFullScreen.value == true ? context.width : videoWidth,
height:
isFullScreen.value == true ? context.height : videoheight,
isFullScreen.value == true ? context.height : videoHeight,
child: PopScope(
canPop: isFullScreen.value != true,
onPopInvoked: (bool didPop) {
@@ -998,8 +998,8 @@ class _VideoDetailPageState extends State<VideoDetailPage>
type: 'emote',
src: videoDetailController
.videoItem['pic'],
width: videowidth,
height: videoheight,
width: videoWidth,
height: videoHeight,
),
),
),
@@ -1011,11 +1011,11 @@ class _VideoDetailPageState extends State<VideoDetailPage>
))),
SizedBox(
width:
isFullScreen.value == true ? context.width : videowidth,
isFullScreen.value == true ? context.width : videoWidth,
height: isFullScreen.value == true
? 0
: context.height -
videoheight -
videoHeight -
(removeSafeArea
? 0
: MediaQuery.of(context).padding.top),
@@ -1041,7 +1041,7 @@ class _VideoDetailPageState extends State<VideoDetailPage>
width: isFullScreen.value == true
? 0
: (context.width -
videowidth -
videoWidth -
(removeSafeArea
? 0
: (MediaQuery.of(context).padding.left +