Widget 的生命週期及 FutureBuilder

紅寶鐵軌客
Join to follow...
Follow/Unfollow Writer: 紅寶鐵軌客
By following, you’ll receive notifications when this author publishes new articles.
Don't wait! Sign up to follow this writer.
WriterShelf is a privacy-oriented writing platform. Unleash the power of your voice. It's free!
Sign up. Join WriterShelf now! Already a member. Login to WriterShelf.
寫程式中、折磨中、享受中 ......
431   0  
·
2021/08/25
·
9 mins read


Summary

Flutter 的 StatefulWidget 從出生到死亡,會有一系列的 methods 通知你它目前的狀態,本文介紹了它的用處。另外也介紹了 FutureBuilder,它可以依照非同步的資料來建立一個「活」的 Widget。

我們前一篇學到了非同步 Asynchronous 的 dart 程式開發,現在馬上就可以用到了,這裡有一個很真實也常常會遇到的情境:

真實情境:Widget 的內容是來自非同步的 Future
...
Why don’t I see the full article?
This article is part of a book for purchase. Purchase the book to access this article.


WriterShelf™ is a unique multiple pen name blogging and forum platform. Protect relationships and your privacy. Take your writing in new directions. ** Join WriterShelf**
WriterShelf™ is an open writing platform. The views, information and opinions in this article are those of the author.


Article info

This article is part of:
分類於:
標籤:
日期:
創作於:2021/08/25,最後更新於:2022/01/18。
合計:2568字


Share this article:
About the Author

很久以前就是個「寫程式的」,其實,什麼程式都不熟⋯⋯
就,這會一點點,那會一點點⋯⋯