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

Infinite scroll for multiple images #59

Merged

Conversation

furkankurt
Copy link
Contributor

@furkankurt furkankurt commented Apr 18, 2024

Description

By default, PageView.builder is infinite in Flutter, unless you provide an itemCount.
I added an option to use the infinite scroll feature for the EasyImageViewPager widget.

You can use infiniteScroll: true to create a "looping" effect with the images. This means that when you reach the end of the image list, you will be taken back to the beginning. This can be useful if you have a small number of images and want to allow the user to scroll through them continuously.

This PR covers the closed issue #42

Checklist

Please ensure your pull request fulfills the following requirements:

  • The commit messages follow our guidelines (CONTRIBUTING.md)
  • Tests for any changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

Type

What kind of change does this pull request introduce?

[ ] Bug fix
[X] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Other (please describe below)

Breaking Changes

Does this pull request introduce any breaking changes?

[ ] Yes
[X] No

@jfahrenkrug
Copy link
Collaborator

@furkankurt Thank you for such a diligently put-together PR. Could you change it so it just contains the infiniteScroll changes? We don't want to update the minimum Dart or Flutter version for this change. Thank you so much. Once that's done, I'm happy to do a code review. Thanks again!

@furkankurt furkankurt marked this pull request as draft April 23, 2024 13:07
@furkankurt furkankurt marked this pull request as ready for review April 23, 2024 13:09
@furkankurt
Copy link
Contributor Author

Hello @jfahrenkrug, thank you for your comment.
I'm looking forward to seeing your review and acceptance, and I hope you will create a new release on the pub.dev as fast as well 💯

@jfahrenkrug
Copy link
Collaborator

@furkankurt Thanks so much for your great work. All tests pass. I have just one small nitpick request: Could you rename infiniteScroll to infinitelyScrollable? Since we already have swipeDismissible and doubleTapZoomable, it would fit better into the naming pattern. Thank you! I also really appreciate the test coverage. This is a truly exemplary PR!

@furkankurt
Copy link
Contributor Author

@jfahrenkrug thank you, I will update it as soon as I available.

@furkankurt furkankurt force-pushed the infinite_scroll_for_multiple_images branch from 4c40abf to 0afaffe Compare April 24, 2024 18:27
Copy link
Collaborator

@jfahrenkrug jfahrenkrug left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Thank you very much.

@jfahrenkrug jfahrenkrug merged commit 6fd1196 into thesmythgroup:main Apr 24, 2024
0 of 4 checks passed
@furkankurt
Copy link
Contributor Author

Thank you @jfahrenkrug, when will you be able to create another release on pub.dev?

@jfahrenkrug
Copy link
Collaborator

@furkankurt Release is out: https://pub.dev/packages/easy_image_viewer

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

Successfully merging this pull request may close these issues.

2 participants