Home > other >  How can I add scrolls to overlapping cards in Flutter?
How can I add scrolls to overlapping cards in Flutter?

Time:01-20

I have a list of cards within a card. When I swipe these inner cards, I want the outer card to slide. My outer card has scroll, but when I try to scroll over the inner cards it doesn't work. When I add scroll to the inner card list, only the cards inside scroll. How can I make the outer card slide when I try to swipe through the inner card?

enter image description here

CodePudding user response:

What you are trying to do is to Have both ListViews scroll at the same time that won't happen.

What you should do is to lock the inner cards and Display all of them so that the outer card can scroll with them.

in the inner cards, ListView put this:

physics: NeverScrollableScrollPhysics(),
shrinkWrap: true,

This should solve your issue.

  •  Tags:  
  • Related