Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vedartm/pagination_view
Flutter package to simplify pagination of list of items from the internet.
https://github.com/vedartm/pagination_view
flutter flutter-package flutter-pagination-list package pagination pagination-library
Last synced: 3 months ago
JSON representation
Flutter package to simplify pagination of list of items from the internet.
- Host: GitHub
- URL: https://github.com/vedartm/pagination_view
- Owner: vedartm
- License: mit
- Created: 2020-01-05T15:40:06.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-03T11:20:05.000Z (almost 2 years ago)
- Last Synced: 2024-05-19T00:42:02.298Z (6 months ago)
- Topics: flutter, flutter-package, flutter-pagination-list, package, pagination, pagination-library
- Language: Dart
- Homepage: https://pub.dev/packages/pagination_view
- Size: 9.28 MB
- Stars: 152
- Watchers: 2
- Forks: 29
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# PaginationView
[![All Contributors](https://img.shields.io/badge/all_contributors-5-orange.svg?style=flat-square)](#contributors-)
[![Actions Status](https://github.com/excogitatr/pagination_view/workflows/build/badge.svg)](https://github.com/excogitatr/pagination_view/actions?query=workflow%3Abuild)
[![pub package](https://img.shields.io/pub/v/pagination_view.svg)](https://pub.dev/packages/pagination_view)
[![pub points](https://badges.bar/pagination_view/pub%20points)](https://pub.dev/packages/pagination_view/score)
[![style: effective dart](https://img.shields.io/badge/style-effective_dart-40c4ff.svg)](https://github.com/tenhobi/effective_dart)
[![License: MIT](https://img.shields.io/badge/license-MIT-purple.svg)](https://opensource.org/licenses/MIT)
## Installing
In your pubspec.yaml
```yaml
dependencies:
pagination_view: ^2.0.0-nullsafety.0
``````dart
import 'package:pagination_view/pagination_view.dart';
```## Basic Usage
```dart
PaginationView(
preloadedItems: [
User(faker.person.name(), faker.internet.email()),
User(faker.person.name(), faker.internet.email()),
],
itemBuilder: (BuildContext context, User user, int index) => ListTile(
title: Text(user.name),
subtitle: Text(user.email),
leading: IconButton(
icon: Icon(Icons.person),
onPressed: () => null,
),
),
header: Text('Header text'),
footer: Text('Footer text'),
paginationViewType: PaginationViewType.listView // optional
pageFetch: pageFetch,
onError: (dynamic error) => Center(
child: Text('Some error occured'),
),
onEmpty: Center(
child: Text('Sorry! This is empty'),
),
bottomLoader: Center( // optional
child: CircularProgressIndicator(),
),
initialLoader: Center( // optional
child: CircularProgressIndicator(),
),
),
```## Contributors ✨
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
Saif Allah Khaled
💻
jezsung
💻
psredzinski
💻
Javier Torrus
💻
Jonjo McKay
💻
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!