Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Yirmeyah-d opened this issue May 7, 2020 · 2 comments
Closed

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

Yirmeyah-d opened this issue May 7, 2020 · 2 comments

Comments

@Yirmeyah-d
Copy link

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
Copy link

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
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants