Home > Back-end >  update flutter page after database change?
update flutter page after database change?

Time:12-03

I am still beginner in Flutter and feel confused in too many issues ,,

now i build a page which is loaded from firebase..each 'document' is loaded into one inkWell, each inkWell is supported with four buttons , two of them are Copy , Delete..

my problem is that I want this listView to be updated once the Update/Delete is implemented..I made some arrangment to let the process go again to the page to refresh it , but this failed..

anyone can help in solving this issue..be aware that all pages are under a provider

enter image description here

CodePudding user response:

you can use the widget StreamBuilder to listen the collection of firebase, every change in the firebase, the StreamBuilder will listen and rebuild the widget.

I think this article from Medium can help you with that. ^^

https://medium.com/quick-code/reading-lists-from-firestore-using-streambuilder-in-flutter-eda590f461ed

Best regards, Leonardo Castro.

  • Related