mirror of
https://github.com/KRTirtho/spotube.git
synced 2026-09-20 06:34:00 +00:00
Merge f2339bd9d3 into 69a310c78f
This commit is contained in:
commit
9d067abd9a
@ -28,13 +28,28 @@ class PlayerOverlay extends HookConsumerWidget {
|
||||
|
||||
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,
|
||||
backdropEnabled: false,
|
||||
minHeight: canShow ? 63 : 0,
|
||||
onPanelSlide: (position) {
|
||||
final invertedPosition = 1 - position;
|
||||
ref.read(navigationPanelHeight.notifier).state = 50 * invertedPosition;
|
||||
ref.read(navigationPanelHeight.notifier).state =
|
||||
50 * invertedPosition;
|
||||
},
|
||||
controller: panelController,
|
||||
color: Colors.transparent,
|
||||
@ -43,12 +58,16 @@ class PlayerOverlay extends HookConsumerWidget {
|
||||
header: SizedBox(
|
||||
height: 63,
|
||||
width: screenSize.width,
|
||||
child: PlayerOverlayCollapsedSection(panelController: panelController),
|
||||
child: PlayerOverlayCollapsedSection(
|
||||
panelController: panelController,
|
||||
),
|
||||
),
|
||||
panelBuilder: (scrollController) => PlayerView(
|
||||
panelController: panelController,
|
||||
scrollController: scrollController,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user