กระพือภาพ stateful วิดเจ็ต
class YellowBird extends StatefulWidget {
const YellowBird({ Key key }) : super(key: key);
@override
_YellowBirdState createState() => _YellowBirdState();
}
class _YellowBirdState extends State<YellowBird> {
@override
Widget build(BuildContext context) {
return Container(color: const Color(0xFFFFE306));
}
}
ทำให้ stateful วิดเจ็ตกระพือภาพ
class MyClass extends StatefulWidget {
@override
MyClassState createState() => new MyClassState();
}
class MyClassState extends State<MyClass> {
//Widgets and other code here
}