mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-08-02 08:40:10 +08:00
@@ -8,6 +8,8 @@ import 'package:PiliPlus/common/widgets/flutter/pop_scope.dart';
|
||||
import 'package:PiliPlus/common/widgets/image/network_img_layer.dart';
|
||||
import 'package:PiliPlus/common/widgets/keep_alive_wrapper.dart';
|
||||
import 'package:PiliPlus/common/widgets/route_aware_mixin.dart';
|
||||
import 'package:PiliPlus/common/widgets/scaffold/mini_scaffold.dart';
|
||||
import 'package:PiliPlus/common/widgets/scaffold/simple_scaffold.dart';
|
||||
import 'package:PiliPlus/common/widgets/scroll_behavior.dart'
|
||||
show NoOverscrollIndicator;
|
||||
import 'package:PiliPlus/common/widgets/scroll_physics.dart'
|
||||
@@ -486,38 +488,32 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
||||
return Obx(
|
||||
() {
|
||||
final isFullScreen = this.isFullScreen;
|
||||
return Scaffold(
|
||||
resizeToAvoidBottomInset: false,
|
||||
return SimpleScaffold(
|
||||
appBar: removeAppBar(isFullScreen)
|
||||
? null
|
||||
: PreferredSize(
|
||||
preferredSize: const .fromHeight(0),
|
||||
child: Obx(
|
||||
() {
|
||||
final scrollRatio =
|
||||
videoDetailController.scrollRatio.value;
|
||||
Brightness? statusBarIconBrightness;
|
||||
if (Platform.isAndroid) {
|
||||
statusBarIconBrightness =
|
||||
isPortrait && scrollRatio >= 0.5
|
||||
? colorScheme.brightness.reverse
|
||||
: .light;
|
||||
}
|
||||
final backgroundColor = isPortrait && scrollRatio > 0
|
||||
? Color.lerp(
|
||||
Colors.black,
|
||||
colorScheme.surface,
|
||||
scrollRatio,
|
||||
)!
|
||||
: Colors.black;
|
||||
return SimpleAppBar(
|
||||
height: padding.top,
|
||||
backgroundColor: backgroundColor,
|
||||
brightness: colorScheme.brightness,
|
||||
statusBarIconBrightness: statusBarIconBrightness,
|
||||
);
|
||||
},
|
||||
),
|
||||
: Obx(
|
||||
() {
|
||||
final scrollRatio = videoDetailController.scrollRatio.value;
|
||||
Brightness? statusBarIconBrightness;
|
||||
if (Platform.isAndroid) {
|
||||
statusBarIconBrightness = isPortrait && scrollRatio >= 0.5
|
||||
? colorScheme.brightness.reverse
|
||||
: .light;
|
||||
}
|
||||
final backgroundColor = isPortrait && scrollRatio > 0
|
||||
? Color.lerp(
|
||||
Colors.black,
|
||||
colorScheme.surface,
|
||||
scrollRatio,
|
||||
)!
|
||||
: Colors.black;
|
||||
return SimpleAppBar(
|
||||
height: padding.top,
|
||||
backgroundColor: backgroundColor,
|
||||
brightness: colorScheme.brightness,
|
||||
statusBarIconBrightness: statusBarIconBrightness,
|
||||
);
|
||||
},
|
||||
),
|
||||
body: ExtendedNestedScrollView(
|
||||
onlyOneScrollInBody: true,
|
||||
@@ -578,10 +574,8 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
||||
),
|
||||
];
|
||||
},
|
||||
body: Scaffold(
|
||||
body: MiniScaffold(
|
||||
key: videoDetailController.childKey,
|
||||
resizeToAvoidBottomInset: false,
|
||||
backgroundColor: Colors.transparent,
|
||||
body: Column(
|
||||
children: [
|
||||
buildTabBar(onTap: videoDetailController.animToTop),
|
||||
@@ -752,16 +746,12 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
||||
Widget get childWhenDisabledLandscape => Obx(
|
||||
() {
|
||||
final isFullScreen = this.isFullScreen;
|
||||
return Scaffold(
|
||||
resizeToAvoidBottomInset: false,
|
||||
return SimpleScaffold(
|
||||
appBar: removeAppBar(isFullScreen)
|
||||
? null
|
||||
: PreferredSize(
|
||||
preferredSize: const .fromHeight(0),
|
||||
child: SimpleAppBar(
|
||||
height: padding.top,
|
||||
brightness: colorScheme.brightness,
|
||||
),
|
||||
: SimpleAppBar(
|
||||
height: padding.top,
|
||||
brightness: colorScheme.brightness,
|
||||
),
|
||||
body: Padding(
|
||||
padding: isFullScreen
|
||||
@@ -794,10 +784,8 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
||||
child: SizedBox(
|
||||
width: introWidth,
|
||||
height: maxHeight - padding.top,
|
||||
child: Scaffold(
|
||||
child: MiniScaffold(
|
||||
key: videoDetailController.childKey,
|
||||
resizeToAvoidBottomInset: false,
|
||||
backgroundColor: Colors.transparent,
|
||||
body: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
@@ -860,10 +848,8 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
||||
child: SizedBox(
|
||||
width: introWidth,
|
||||
height: introHeight,
|
||||
child: Scaffold(
|
||||
child: MiniScaffold(
|
||||
key: videoDetailController.childKey,
|
||||
resizeToAvoidBottomInset: false,
|
||||
backgroundColor: Colors.transparent,
|
||||
body: Column(
|
||||
children: [
|
||||
buildTabBar(showIntro: false),
|
||||
@@ -944,10 +930,8 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
||||
child: SizedBox(
|
||||
width: maxWidth - width - padding.horizontal,
|
||||
height: maxHeight - padding.top,
|
||||
child: Scaffold(
|
||||
child: MiniScaffold(
|
||||
key: videoDetailController.childKey,
|
||||
resizeToAvoidBottomInset: false,
|
||||
backgroundColor: Colors.transparent,
|
||||
body: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
@@ -993,16 +977,12 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
||||
|
||||
Widget get childWhenDisabledAlmostSquare => Obx(() {
|
||||
final isFullScreen = this.isFullScreen;
|
||||
return Scaffold(
|
||||
resizeToAvoidBottomInset: false,
|
||||
return SimpleScaffold(
|
||||
appBar: removeAppBar(isFullScreen)
|
||||
? null
|
||||
: PreferredSize(
|
||||
preferredSize: const .fromHeight(0),
|
||||
child: SimpleAppBar(
|
||||
height: padding.top,
|
||||
brightness: colorScheme.brightness,
|
||||
),
|
||||
: SimpleAppBar(
|
||||
height: padding.top,
|
||||
brightness: colorScheme.brightness,
|
||||
),
|
||||
body: Padding(
|
||||
padding: isFullScreen
|
||||
@@ -1052,10 +1032,8 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
||||
child: SizedBox(
|
||||
width: maxWidth - padding.horizontal,
|
||||
height: bottomHeight,
|
||||
child: Scaffold(
|
||||
child: MiniScaffold(
|
||||
key: videoDetailController.childKey,
|
||||
resizeToAvoidBottomInset: false,
|
||||
backgroundColor: Colors.transparent,
|
||||
body: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
@@ -1090,10 +1068,9 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
||||
);
|
||||
}
|
||||
|
||||
Widget get manualPlayerWidget => Obx(() {
|
||||
Widget manualPlayerWidget(double height) => Obx(() {
|
||||
if (!videoDetailController.autoPlay) {
|
||||
return Stack(
|
||||
clipBehavior: Clip.none,
|
||||
children: [
|
||||
Positioned(
|
||||
top: 0,
|
||||
@@ -1156,12 +1133,8 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
||||
),
|
||||
Positioned(
|
||||
right: 12,
|
||||
bottom: 10,
|
||||
child: IconButton(
|
||||
tooltip: '播放',
|
||||
onPressed: handlePlay,
|
||||
icon: const PlayIcon(),
|
||||
),
|
||||
top: height - 70,
|
||||
child: const PlayIcon(),
|
||||
),
|
||||
],
|
||||
);
|
||||
@@ -1498,7 +1471,7 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
||||
}
|
||||
return const SizedBox.shrink();
|
||||
}),
|
||||
manualPlayerWidget,
|
||||
manualPlayerWidget(height),
|
||||
|
||||
if (videoDetailController.plPlayerController.enableBlock ||
|
||||
videoDetailController.continuePlayingPart)
|
||||
@@ -1863,7 +1836,6 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
||||
// ai总结
|
||||
void showAiBottomSheet() {
|
||||
videoDetailController.childKey.currentState?.showBottomSheet(
|
||||
backgroundColor: Colors.transparent,
|
||||
constraints: const BoxConstraints(),
|
||||
(context) =>
|
||||
AiConclusionPanel(item: ugcIntroController.aiConclusionResult!),
|
||||
@@ -1875,7 +1847,6 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
||||
List<VideoTagItem>? videoTags,
|
||||
) {
|
||||
videoDetailController.childKey.currentState?.showBottomSheet(
|
||||
backgroundColor: Colors.transparent,
|
||||
constraints: const BoxConstraints(),
|
||||
(context) => PgcIntroPanel(
|
||||
item: videoDetail,
|
||||
@@ -1946,7 +1917,6 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
||||
);
|
||||
} else {
|
||||
videoDetailController.childKey.currentState?.showBottomSheet(
|
||||
backgroundColor: Colors.transparent,
|
||||
constraints: const BoxConstraints(),
|
||||
(context) => listSheetContent(),
|
||||
);
|
||||
@@ -2027,7 +1997,6 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
||||
);
|
||||
} else {
|
||||
videoDetailController.childKey.currentState?.showBottomSheet(
|
||||
backgroundColor: Colors.transparent,
|
||||
constraints: const BoxConstraints(),
|
||||
(context) => ViewPointsPage(
|
||||
videoDetailController: videoDetailController,
|
||||
@@ -2039,7 +2008,6 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
||||
|
||||
void onShowMemberPage(int? mid) {
|
||||
videoDetailController.childKey.currentState?.showBottomSheet(
|
||||
shape: const RoundedRectangleBorder(),
|
||||
constraints: const BoxConstraints(),
|
||||
(context) {
|
||||
return HorizontalMemberPage(
|
||||
|
||||
Reference in New Issue
Block a user