参考https://www.jb51.net/article/263730.htm
无状态
StatelessWidget
class LessComponent extends StatelessWidget { const LessComponent({Key? key}) : super(key: key); @override Widget build(BuildContext context) { return Container(); } }
有状态--State
StatefulWidget
class FulComponent extends StatefulWidget { const FulComponent({Key? key}) : super(key: key); @override _FulComponentState createState() => _FulComponentState(); } class _FulComponentState extends State<FulComponent> { @override Widget build(BuildContext context) { return Container(); } }
标签:状态,Widget,FulComponentState,深入,key,override,extends,class From: https://www.cnblogs.com/xiongwei/p/18398180