KenAragorn/create_flutter_provider_app

Reflect Real Time Change from Database

Opened this issue · 1 comments

Hi Ken,
Thank you for making this. This is a not an issue but rather a question:
I am building a Chat App with Flutter and FireStore. At first I just stream the data directly to Stream Builder and store reusable data like user data in Shared Preferences, but this might cause a lot of calls to the database for non-reusable data. So I search and find out about using provider with Firestore and find your project. My question is, if using Provider, can the data reflect changes in real time if there are changes in the database, like if an user change their name and all people in their friend list can see the changed name? Or in a chat group, if someone send a message, will other see them also or do they have to refresh the data? I know it might not related too much to the project but I am planning on scrapping my current one and use your as a template to build it if it match the above critia.

hi @lightspect ,

Yes, it is possible especially with Firebase. To be honest, this current example of project that utilize the concept of todo collection is almost live update. You can try using 2 mobile phone and connect to the same todo title, and then you can try to add or make changes. You can see live changes on the other phone.