美文网首页
Flutter 开发错误 StatefulWidget.crea

Flutter 开发错误 StatefulWidget.crea

作者: xxxixxxx | 来源:发表于2020-12-03 18:37 被阅读0次

报错如下:

StatefulWidget.createState must return a subtype of State

The createState function for XXXX2 returned a state of type _XXXXState, which is not a subtype of State<XXXX2>, violating the contract for createState.

错误分析:
其实就是返回的 Widget 类型不对,
大意了,修改正确即可。

错误图

相关文章

网友评论

      本文标题:Flutter 开发错误 StatefulWidget.crea

      本文链接:https://www.haomeiwen.com/subject/fqcvwktx.html