best-flutter / flutter_swiper

The best swiper for flutter , with multiple layouts, infinite loop. Compatible with Android & iOS.
MIT License
3.51k stars 717 forks source link

How to have Swiper automatically adapt to his items ? #201

Closed Yirmeyah-d closed 4 years ago

Yirmeyah-d commented 4 years ago

I want Swiper to adapt to his items height and auto-resize. Here my code: Swiper( itemBuilder: (BuildContext context, int index) { return savedPostItems[index]; }, itemCount: savedPostItems.length, viewportFraction: 0.8, scale: 0.9, loop: false, itemWidth: 450, itemHeight: 300, layout: SwiperLayout.TINDER, ) The items in it are container. Thank you in advance,

ahmadkhedr commented 4 years ago

I want Swiper to adapt to his items height and auto-resize. Here my code: Swiper( itemBuilder: (BuildContext context, int index) { return savedPostItems[index]; }, itemCount: savedPostItems.length, viewportFraction: 0.8, scale: 0.9, loop: false, itemWidth: 450, itemHeight: 300, layout: SwiperLayout.TINDER, ) The items in it are container. Thank you in advance,

have you reached the solution?

Yirmeyah-d commented 4 years ago

Yes i have but it wasn't really the answer to this questions. I foud a way to solve my issue without havig to adapt Swiper automatically to his item