How to Get Real time Updates From Firebase In Firebase
问题 I've been trying to get Firebase to work real time and i have a couple of issues. What i want to achieve is to be able to tell when a new document is added to a collection, just that, nothing more. What seems to be happening is my code always returns all the documents in the collection. Below is my code: listenNewPost(int categoryId, Users user, Function(DocumentSnapshot) onData) async { var ref = this._firestore.collection('posts').reference(); var query = ref.orderBy('created_at',