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 :
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