Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/octomato/preload_page_view
Flutter pre-load PageView widget
https://github.com/octomato/preload_page_view
Last synced: 3 months ago
JSON representation
Flutter pre-load PageView widget
- Host: GitHub
- URL: https://github.com/octomato/preload_page_view
- Owner: octomato
- License: apache-2.0
- Created: 2019-02-03T08:18:34.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-09-27T11:33:21.000Z (about 1 year ago)
- Last Synced: 2024-07-30T22:12:35.150Z (4 months ago)
- Language: Dart
- Size: 107 KB
- Stars: 165
- Watchers: 7
- Forks: 49
- Open Issues: 22
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# PreloadPageView
Like the name, this is the widget to support Pre-load function for PageView widget.
For better user experience sometimes we need pre-load the `images`/`web requests` before user really scrolled to next PageView but the official PageView don't support that.So this is the time to use `PreloadPageView`.
## Usage
Everything is similar like PageView, you need `PreloadPageView.builder` and `PreloadPageController` to create the PreloadPageView.
Also you can use `preloadPagesCount` to set preload pages count when you need.
### Example``` dart
@override
Widget build(BuildContext context) {
return new PreloadPageView.builder(
itemCount: ...,
itemBuilder: ...,
onPageChanged: (int position) {...},
.....
preloadPagesCount: 3,
controller: PreloadPageController(),
);
}
```If you found any issue in the newest beta version, please try stable version [0.1.4]. Please give us a star if you like this widget. Your star could help us update or fix bugs quickly.