flutter Vs code 快速创建2个状态的快捷代码
StatelessW
StateFullW
输入st就大概可以选择快速创建2个状态的快捷代码
class name extends StatefulWidget {
name({Key key}) : super(key: key);
@override
_nameState createState() => _nameState();
}
class _nameState extends State<name> {
@override
Widget build(BuildContext context) {
return Container(
child: child,
);
}
}
class name extends StatelessWidget {
const name({Key key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Container(
child: child,
);
}
}