What is the difference between future provider and future builder in flutter(dart)

Viewed 85

When should I use future builder or future provider. It seems to me they do almost same work.

1 Answers

The answer is from here:

  • FutureProvider: you can use this to retrieve a document from firestore and show a loading screen while waiting, but can't make changes to it afterwards, that will also show in the UI

  • FutureBuilder: same as above but it can't provide data down the widget-tree

Related