flutter

共找到 1 篇文章

1 篇文章
1 分钟阅读
1500 字数
flutter

flutter 生命周期

flutter 生命周期 🔗 createState(): When the Framework is instructed to build a StatefulWidget, it immediately calls createState() mounted is true: When createState creates your state class, a buildContext is assigned to that state. buildContext is, overly simplified, the place in the widget tree in which this widget is placed. Here’s a longer explanation. All widgets have a bool this.mounted property. It is turned true when the buildContext