Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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!