[英]What is the difference between future provider and future builder in flutter(dart)
我什么時候應該使用未來的建設者或未來的提供者。 在我看來,他們做的工作幾乎一樣。
答案來自這里:
FutureProvider:您可以使用它從 firestore 檢索文檔並在等待時顯示加載屏幕,但之后不能對其進行更改,這也會顯示在 UI 中
FutureBuilder:與上面相同,但它不能在小部件樹下提供數據
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.