Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lesnitsky/infinite_view_pager
📜Infinite View Pager widget for Flutter
https://github.com/lesnitsky/infinite_view_pager
flutter flutter-widget infinite-lists infinite-scroll infinitescroll infinitescrollview viewpager
Last synced: 6 days ago
JSON representation
📜Infinite View Pager widget for Flutter
- Host: GitHub
- URL: https://github.com/lesnitsky/infinite_view_pager
- Owner: lesnitsky
- License: mit
- Created: 2019-10-08T16:28:31.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-01-27T18:58:37.000Z (almost 5 years ago)
- Last Synced: 2024-12-12T10:37:37.960Z (11 days ago)
- Topics: flutter, flutter-widget, infinite-lists, infinite-scroll, infinitescroll, infinitescrollview, viewpager
- Language: Dart
- Homepage: https://lesnitsky.com/infinite_view_pager/build/web/#/
- Size: 831 KB
- Stars: 26
- Watchers: 3
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# infinite_view_pager
Flutter infinite view pager widget
[![GitHub stars](https://img.shields.io/github/stars/lesnitsky/infinite_view_pager.svg?style=social)](https://github.com/lesnitsky/infinite_view_pager)
[![Twitter Follow](https://img.shields.io/twitter/follow/lesnitsky_dev.svg?label=Follow%20me&style=social)](https://twitter.com/lesnitsky_dev)![Demo](https://screenshots-lesnitsky.s3.eu-west-2.amazonaws.com/infinite_view_pager_demo.gif)
## Installation
```yaml
dependencies:
infinite_view_pager: ^1.0.0
```## Example
```dart
import 'package:infinite_view_pager/infinite_view_pager.dart';class InfiniteViewPagerDemo extends StatefulWidget {
@override
_InfiniteViewPagerDemoState createState() => _InfiniteViewPagerDemoState();
}class _InfiniteViewPagerDemoState extends State {
int index = 0;Widget _buildPage(BuildContext context, int direction) {
return Container(
padding: EdgeInsets.all(100.0),
child: Card(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(20.0),
),
elevation: 10,
child: Center(
child: Text(
(index + direction).toString(),
style: Theme.of(context).textTheme.display4,
),
),
),
);
}@override
Widget build(BuildContext context) {
return Container(
child: InfiniteViewPager(
onPageChanged: (direction) {
index += direction;
},
pageBuilder: _buildPage,
scrollDirection: Axis.vertical,
),
);
}
}
```## Author
[Andrei Lesnitsky](https://github.com/lesnitsky)
## License
MIT
[![GitHub stars](https://img.shields.io/github/stars/lesnitsky/infinite_view_pager.svg?style=social)](https://github.com/lesnitsky/infinite_view_pager)
[![Twitter Follow](https://img.shields.io/twitter/follow/lesnitsky_dev.svg?label=Follow%20me&style=social)](https://twitter.com/lesnitsky_dev)