Flutter 开发错误 StatefulWidget.crea

2020-12-03  本文已影响0人  xxxixxxx

报错如下:

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 类型不对,
大意了,修改正确即可。

错误图
上一篇 下一篇

猜你喜欢

热点阅读