Skip to content

Instantly share code, notes, and snippets.

@22shubh22
Created September 23, 2020 07:39
Show Gist options
  • Save 22shubh22/9487864c54443abcaded9d04cea331d5 to your computer and use it in GitHub Desktop.
Save 22shubh22/9487864c54443abcaded9d04cea331d5 to your computer and use it in GitHub Desktop.
@override
Stream<List<Order>> orders(String id) {
return ordersCollection.snapshots().map((snapshot) {
return snapshot.documents.where((element) => element.data['ordererId']==id)
.map((doc) => Order.fromEntity(OrderEntity.fromSnapshot(doc)))
.toList();
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment