fix(player): 顶层抓帧淡出揭幕

This commit is contained in:
Zhou Weidong committed 2026-10-26 17:31:59 +08:00
1 parent c8ec481fc9
commit e8f192ccf8
2 files changed
+168 -36

No files matched your search

@@ -53,11 +53,13 @@ class PlayerRenderStack extends StatefulWidget {
required this.pageController,
required this.slots,
this.onCurrentVideoVisible,
this.showNeighbors = true,
});
final PageController pageController;
final Map<PlayerRenderSlotRole, PlayerRenderSlotData> slots;
final VoidCallback? onCurrentVideoVisible;
final bool showNeighbors;
@override
State<PlayerRenderStack> createState() => _PlayerRenderStackState();
@@ -115,11 +117,13 @@ class _PlayerRenderStackState extends State<PlayerRenderStack> {
: MediaQuery.sizeOf(context).height;
final pageOffset = _pageOffset();
final currentPage = _currentSlot.pagePosition ?? pageOffset;
final slots = [
_slotData(PlayerRenderSlotRole.previous),
_slotData(PlayerRenderSlotRole.current),
_slotData(PlayerRenderSlotRole.next),
];
final slots = widget.showNeighbors
? [
_slotData(PlayerRenderSlotRole.previous),
_slotData(PlayerRenderSlotRole.current),
_slotData(PlayerRenderSlotRole.next),
]
: [_slotData(PlayerRenderSlotRole.current)];
return Stack(
key: const Key('player-render-stack'),
fit: StackFit.expand,