flutter

共找到 2 篇文章

2 篇文章
2 分钟阅读
3000 字数
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

flutter

flutter 问题整理

Undefined name ‘OutlineButton’. 🔗使用TextButton代替 Try adding either an explicit non-’null’ default value or the ‘required’ modifier. 🔗空安全报错,一旦sdk升级到2.12以上之后,那么就会执行空安全检查 添加关键字