我自己写的,因为 statefulwidget 没有自动创建模式,并且在 7 个不同的错误中我无法解决这个问题
class NaberMain extends StatefulWidget {
NaberMain({Key key}) : super(key: key)
// ignore: empty_constructor_bodies
@override
_NaberMainState createState() => _NaberMainState();
}
class _NaberMainState extends State<NaberMain> {
@override
Widget build(BuildContext context) {
return Container(
);
}
}```
Run Code Online (Sandbox Code Playgroud)