mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
@@ -22,6 +22,7 @@ import 'package:PiliPlus/pages/search/widgets/search_text.dart';
|
||||
import 'package:PiliPlus/pages/video/detail/introduction/controller.dart';
|
||||
import 'package:PiliPlus/pages/video/detail/related/controller.dart';
|
||||
import 'package:PiliPlus/pages/video/detail/reply/controller.dart';
|
||||
import 'package:PiliPlus/pages/video/detail/view_v.dart' show ViewPointsPage;
|
||||
import 'package:PiliPlus/pages/video/detail/widgets/send_danmaku_panel.dart';
|
||||
import 'package:PiliPlus/pages/video/detail/widgets/watch_later_list.dart';
|
||||
import 'package:PiliPlus/utils/extension.dart';
|
||||
@@ -1329,8 +1330,10 @@ class VideoDetailController extends GetxController
|
||||
} else {
|
||||
childKey.currentState?.showBottomSheet(
|
||||
enableDrag: false,
|
||||
(context) => _postPanel(),
|
||||
backgroundColor: Colors.transparent,
|
||||
(context) => ViewPointsPage(
|
||||
child: _postPanel(),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1496,6 +1499,8 @@ class VideoDetailController extends GetxController
|
||||
? Stack(
|
||||
children: [
|
||||
SingleChildScrollView(
|
||||
controller: ScrollController(),
|
||||
physics: const AlwaysScrollableScrollPhysics(),
|
||||
child: Column(
|
||||
children: [
|
||||
...List.generate(
|
||||
|
||||
@@ -107,7 +107,7 @@ class _VideoReplyPanelState extends State<VideoReplyPanel>
|
||||
? null
|
||||
: _videoReplyController.scrollController,
|
||||
physics: widget.needController == false
|
||||
? const NeverScrollableScrollPhysics(
|
||||
? const AlwaysScrollableScrollPhysics(
|
||||
parent: ClampingScrollPhysics(),
|
||||
)
|
||||
: const AlwaysScrollableScrollPhysics(),
|
||||
|
||||
@@ -1796,13 +1796,13 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
||||
);
|
||||
|
||||
Widget videoIntro([bool needRelated = true, bool needCtr = true]) {
|
||||
Widget introPanel() => Material(
|
||||
color: Colors.transparent,
|
||||
child: CustomScrollView(
|
||||
Widget introPanel() => Scaffold(
|
||||
backgroundColor: Colors.transparent,
|
||||
body: CustomScrollView(
|
||||
key: const PageStorageKey<String>('简介'),
|
||||
controller: needCtr ? _introController : null,
|
||||
physics: needCtr.not
|
||||
? const NeverScrollableScrollPhysics(
|
||||
? const AlwaysScrollableScrollPhysics(
|
||||
parent: ClampingScrollPhysics(),
|
||||
)
|
||||
: null,
|
||||
@@ -2260,6 +2260,8 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
||||
],
|
||||
),
|
||||
body: SingleChildScrollView(
|
||||
controller: ScrollController(),
|
||||
physics: const AlwaysScrollableScrollPhysics(),
|
||||
child: Column(
|
||||
children: [
|
||||
...List.generate(
|
||||
@@ -2358,7 +2360,9 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
||||
} else {
|
||||
videoDetailController.childKey.currentState?.showBottomSheet(
|
||||
backgroundColor: Colors.transparent,
|
||||
(context) => listSheetContent(),
|
||||
(context) => ViewPointsPage(
|
||||
child: listSheetContent(),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -2391,3 +2395,35 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class ViewPointsPage extends StatefulWidget {
|
||||
const ViewPointsPage({super.key, required this.child});
|
||||
|
||||
final Widget child;
|
||||
|
||||
@override
|
||||
State<ViewPointsPage> createState() => _ViewPointsPageState();
|
||||
}
|
||||
|
||||
class _ViewPointsPageState extends State<ViewPointsPage> {
|
||||
bool _isInit = true;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
setState(() {
|
||||
_isInit = false;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return _isInit
|
||||
? CustomScrollView(
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
)
|
||||
: widget.child;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user