sliding_up_panel icon indicating copy to clipboard operation
sliding_up_panel copied to clipboard

Body overlap question

Open GrbavaCigla opened this issue 3 years ago • 4 comments

Hi,

I have set up SlidingUpPanel in recommended way, but it is overlapping ListView in body. How do I make it not overlap?

Thanks in advance and sorry for my noobish question.

GrbavaCigla avatar May 08 '21 13:05 GrbavaCigla

Seems the body doesn't take into account the size of the collapsed player. Since these are shown together in a stack, the body will be hidden if height is bigger than screensize - collapsedPlayer.

You can fix this by setting the height of the slidingPanel with the minHeight property (which controls the collapsed player), and by wrapping the listView in a SizedBox with screensize - collapsedPlayerHeight.

In my case I also had a bottom navigation bar, so I also took into account the bottomNavigation height.

SlidingUpPanel(
           minHeight: kCollapsedPlayerHeight,
  body: myWidget()
)


// MyWidget

    return SizedBox(
      height: MediaQuery.of(context).size.height - kBottomNavigationBarHeight - kCollapsedPlayerHeight,
      child: currentItem != null && currentItem.shows != null ? ListView.builder(
          itemCount: currentItem.shows.length,
          itemBuilder: (context, index) {
        return ShowItem(show: currentItem.shows[index]);
      })

RickVM avatar May 09 '21 18:05 RickVM

Thank you, sorry for my late response. I cant limit body because panel is rounded and clipping is then visible. I tried making element in body same height as panel, but for some reason (even though heights are the same) height of element in body gets overlapped.

GrbavaCigla avatar May 11 '21 17:05 GrbavaCigla

same issues

nguyendangkhoi avatar Sep 07 '21 08:09 nguyendangkhoi

same issue here

Fethi-Hamdani avatar Oct 06 '21 16:10 Fethi-Hamdani