diff --git a/CHANGELOG.md b/CHANGELOG.md index 7845b4a..f57045c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,19 @@ ## 1.0.3 +### Breaking changes + +- Changes `emptyDisplay` to `onEmpty` +- `itemBuilder` type changes to `Function(BuildContext, List, 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 diff --git a/README.md b/README.md index 594c0df..b35db4d 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,9 @@ # Pagination in Firestore + [![All Contributors](https://img.shields.io/badge/all_contributors-10-orange.svg?style=flat-square)](#contributors-) + [![pub package](https://img.shields.io/pub/v/paginate_firestore.svg)](https://pub.dev/packages/paginate_firestore) @@ -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 @@ -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'),