I was checking out the Flutter firestore dependency and wanted to know how can I get only the documents that are newly added or modified?
I am not sure whether the code will return all snapshots in collection 'abc' first and then filter modified ones?
Because if it returns all snapshots and my collection has 1 million snapshots and only 1 modified then my code will end up reading all 1 million snapshots to get that 1 modified one.
Firestore.instance.collection('abc').snapshots().listen((data){
data.forEach((change) {
if(change.type == DocumentChangeType.Modified) {
}
})
})