Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Is there a way to automatically update the data in the page if a data is updated in cloud firestore using flutter

I want to make an app that will automatically update the displayed data if the data inside the cloud firestore has been updated by the admin or other user.

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

What you’re describing are known are realtime listeners in Firestore. You can attach one by calling onSnapshot on a reference to the data or query, and will then be called with the current data right away and subsequently whenever the data gets updated.

To show this data in the UI of your Flutter app, you can use a StreamBuilder as shown in this example in the documentation.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading