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 increase swiping speed in swiper example #36

Closed
viratshukla opened this issue Nov 6, 2020 · 6 comments
Closed

How to increase swiping speed in swiper example #36

viratshukla opened this issue Nov 6, 2020 · 6 comments
Labels
enhancement New feature or request question Further information is requested

Comments

@viratshukla
Copy link

For example, we have large number of horizontal content to be scrolled.
And it should be in same manner - like item should always come to middle after scrolling. Currently with swiper, it hardly scrolls 2-3 views at a time, which is really inconvenient.

Any suggestion to increase the scrolling speed?

@viratshukla
Copy link
Author

[ "Item 1".text.white.make().box.rounded.alignCenter.black.make().p4(), "Item 2".text.make().box.rounded.alignCenter.green500.make().p4(), "Item 3".text.make().box.rounded.alignCenter.blue500.make().p4(), "Item 4".text.make().box.rounded.alignCenter.red500.make().p4(), "Item 5".text.make().box.rounded.alignCenter.orange500.make().p4(), "Item 6".text.make().box.rounded.alignCenter.pink500.make().p4(), "Item 11".text.white.make().box.rounded.alignCenter.black.make().p4(), "Item 12".text.make().box.rounded.alignCenter.green500.make().p4(), "Item 13".text.make().box.rounded.alignCenter.blue500.make().p4(), "Item 14".text.make().box.rounded.alignCenter.red500.make().p4(), "Item 15".text.make().box.rounded.alignCenter.orange500.make().p4(), "Item 16".text.make().box.rounded.alignCenter.pink500.make().p4(), "Item 21".text.white.make().box.rounded.alignCenter.black.make().p4(), "Item 22".text.make().box.rounded.alignCenter.green500.make().p4(), "Item 23".text.make().box.rounded.alignCenter.blue500.make().p4(), "Item 24".text.make().box.rounded.alignCenter.red500.make().p4(), "Item 25".text.make().box.rounded.alignCenter.orange500.make().p4(), "Item 26".text.make().box.rounded.alignCenter.pink500.make().p4(), "Item 31".text.white.make().box.rounded.alignCenter.black.make().p4(), "Item 32".text.make().box.rounded.alignCenter.green500.make().p4(), "Item 33".text.make().box.rounded.alignCenter.blue500.make().p4(), "Item 34".text.make().box.rounded.alignCenter.red500.make().p4(), "Item 35".text.make().box.rounded.alignCenter.orange500.make().p4(), "Item 36".text.make().box.rounded.alignCenter.pink500.make().p4(), ].swiper( height: context.isMobile ? 200 : 400, enlargeCenterPage: true, scrollDirection: Axis.horizontal),

@iampawan
Copy link
Owner

iampawan commented Nov 7, 2020

That's what pretty much the framework offers so there is no direct way of doing it as of now. However it should just work fine when you scroll fast if you don't have heavy data.

@iampawan iampawan added the question Further information is requested label Nov 7, 2020
@viratshukla
Copy link
Author

viratshukla commented Nov 7, 2020

No actually it doesn't scroll more than 2-3 items. Even with your Boxes/Container() - which are very light.
Looks like, it is property of PageView. That at most 2-3 items are scrolled. While in other like horizontal list view, items are scrolled very fast.

May be because of pageView, it's not possible.
Can we implement the same behaviour (At a time, 1 is highlighted and it should auto-scroll in middle when finger is removed from screen) with ListView?

@iampawan
Copy link
Owner

iampawan commented Nov 7, 2020 via email

@iampawan iampawan added the enhancement New feature or request label Nov 9, 2020
@iampawan
Copy link
Owner

Added a new flag "isFastScrollingEnabled" to scroll the page view even faster. Closing on behalf of 4de9f6e

@iampawan
Copy link
Owner

@viratshukla Can you try it now once?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants