Different Types of Snapshots in Flutter

Mar 19, 2021 . 1 min Muhammed Mukhthar CM Cover Image

There are 4 major types of Snapshots in Flutter when working with Firebase. These are,

If you are a keen observer, you must’ve noticed some of them in my ListView from Firestore Tutorial.

AsyncSnapshot

This is kind of Superset of all the Asynchronous data sources in Flutter. These AsynSnapshots cover the states such as ConnectionState, whether there is an Error, or the Data source is Empty etc.

QuerySnapshot

DocumentSnapshot

If you have noticed, in ListView From Firestore Tutorial, we looped through a QuerySnapshot to get Individual DocumentSnapshots and used data() parameter to show the data to user.

QueryDocumentSnapshot

I think this one was useful to you. Please let me know your suggestion and Ideas via Twitter or drop a mail at [email protected]. You can also use the below comment box if you want to. 😊

Finally, if you found this helpful, please share this within your reach so that more people can benefit from this. And Follow me on Twitter for getting more posts like these 😉.