Skip to content

Commit

Permalink
chore: Updates changelog and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
vedartm committed Nov 17, 2021
1 parent 9fb1fc4 commit cb2febb
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 10 deletions.
17 changes: 13 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
## 1.0.3

### Breaking changes

- Changes `emptyDisplay` to `onEmpty`
- `itemBuilder` type changes to `Function(BuildContext, List<DocumentSnapshot>, int)`

### Other changes

- Adds `allowImplicitScrolling` for snaphots and `options` for get
- Removes scroll from `onEmpty` and `onError`
- Use the new `flutter_lints` package and apply changes
- Updates `cloud_firestore` to v2.5.3
- Updates `provider` to v6.0.0
- Updates `bloc` to v7.1.0
- Updates `flutter_bloc` to v7.2.0
- Updates `cloud_firestore` to v3.1.0
- Updates `provider` to v6.0.1
- Updates `bloc` to v7.2.1
- Updates `flutter_bloc` to v7.3.3

## 1.0.2

Expand Down
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# Pagination in Firestore

<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->

[![All Contributors](https://img.shields.io/badge/all_contributors-10-orange.svg?style=flat-square)](#contributors-)

<!-- ALL-CONTRIBUTORS-BADGE:END -->

[![pub package](https://img.shields.io/pub/v/paginate_firestore.svg)](https://pub.dev/packages/paginate_firestore)
Expand Down Expand Up @@ -36,12 +38,12 @@ Implement it
```dart
PaginateFirestore(
//item builder type is compulsory.
itemBuilder: (index, context, documentSnapshot) {
final data = documentSnapshot.data() as Map?;
itemBuilder: (context, documentSnapshots, index) {
final data = documentSnapshots[index].data() as Map?;
return ListTile(
leading: CircleAvatar(child: Icon(Icons.person)),
title: data == null ? Text('Error in data') : Text(data['name']),
subtitle: Text(documentSnapshot.id),
subtitle: Text(documentSnapshots[index].id),
);
},
// orderBy is compulsory to enable pagination
Expand All @@ -60,10 +62,10 @@ To use with listeners:
RefreshIndicator(
child: PaginateFirestore(
itemBuilder: (index, context, documentSnapshot) => ListTile(
itemBuilder: (context, documentSnapshots, index) => ListTile(
leading: CircleAvatar(child: Icon(Icons.person)),
title: Text(documentSnapshot.data()['name']),
subtitle: Text(documentSnapshot.documentID),
title: Text(documentSnapshots[index].data()['name']),
subtitle: Text(documentSnapshots[index].id),
),
// orderBy is compulsary to enable pagination
query: Firestore.instance.collection('users').orderBy('name'),
Expand Down

0 comments on commit cb2febb

Please sign in to comment.