Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How can I add scrolls to overlapping cards in Flutter?

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

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

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.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading