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,
     );
   }
 }





posted @ 2020-06-22 19:55  云飞扬IT  阅读(635)  评论(0编辑  收藏  举报