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

How can I update the data automatically without refreshing the page in firebase flutter?

I have to display total number of Sales and pending sales in the dashboard. I have designed inside the container.
I need to update that every time new sales adds to Firebase Firestore automatically. How can I achieve this.

>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

You may use stream builder or future builder to get data without getting refresh every time.

Here is the docs:

=> https://api.flutter.dev/flutter/widgets/StreamBuilder-class.html
=> https://api.flutter.dev/flutter/widgets/FutureBuilder-class.html

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