报错如下:
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 类型不对,
大意了,修改正确即可。
网友评论