Questions tagged «statelesswidget»

14
Flutter中有状态和无状态小部件之间有什么关系?
有状态窗口小部件定义为在其生存期内更改其状态的任何窗口小部件。但是StatelessWidget,将aStatefulWidget作为其子级之一是非常普遍的做法。StatelessWidget如果将其StatefulWidget作为子级之一,是否不会成为有状态的? 我试图寻找到的文件作为代码的一部分StatelessWidget,但无法弄清楚如何StatelessWidget可以Statefulwidget作为它的孩子,但仍保持StatelessWidget。 Flutter中有状态和无状态小部件之间的关系和区别是什么?
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.