This commit is contained in:
Netveil 2026-08-31 23:02:57 +02:00 committed by GitHub
commit 9d067abd9a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -28,13 +28,28 @@ class PlayerOverlay extends HookConsumerWidget {
final panelController = ref.watch(playerOverlayControllerProvider); final panelController = ref.watch(playerOverlayControllerProvider);
return SlidingUpPanel( // [SlidingUpPanel] animates its own height between [minHeight] and
// [maxHeight] (the full screen height) while it is being opened/closed.
// Since this widget sits as a plain child inside the [Scaffold]'s
// footers column, that transient height briefly exceeds the collapsed
// [minHeight] slot it was given, overflowing the footers column by a
// few pixels. [OverflowBox] lets the panel keep painting at its actual
// (larger) size while reporting only the fixed collapsed height to its
// parent, so the outer layout never overflows.
return SizedBox(
height: canShow ? 63 : 0,
width: screenSize.width,
child: OverflowBox(
maxHeight: screenSize.height,
alignment: Alignment.bottomCenter,
child: SlidingUpPanel(
maxHeight: screenSize.height, maxHeight: screenSize.height,
backdropEnabled: false, backdropEnabled: false,
minHeight: canShow ? 63 : 0, minHeight: canShow ? 63 : 0,
onPanelSlide: (position) { onPanelSlide: (position) {
final invertedPosition = 1 - position; final invertedPosition = 1 - position;
ref.read(navigationPanelHeight.notifier).state = 50 * invertedPosition; ref.read(navigationPanelHeight.notifier).state =
50 * invertedPosition;
}, },
controller: panelController, controller: panelController,
color: Colors.transparent, color: Colors.transparent,
@ -43,12 +58,16 @@ class PlayerOverlay extends HookConsumerWidget {
header: SizedBox( header: SizedBox(
height: 63, height: 63,
width: screenSize.width, width: screenSize.width,
child: PlayerOverlayCollapsedSection(panelController: panelController), child: PlayerOverlayCollapsedSection(
panelController: panelController,
),
), ),
panelBuilder: (scrollController) => PlayerView( panelBuilder: (scrollController) => PlayerView(
panelController: panelController, panelController: panelController,
scrollController: scrollController, scrollController: scrollController,
), ),
),
),
); );
} }
} }