How to create Fullstate widget in flutter manually
CHIRAG KUMAR
1 min read
Table of contents
step 1. Create a class with MywidgetName and extends it.
class MyWidget extends StatefulWidget extends {
}
// Then creae a another class with same name but
class MyWidgetState extends State<MyWidget>{
@override
Widget build(BuildContext context){
return Scaffold();
}
}
// look care fully in seccond class
1. MyWidget comes with MyWidget + State and
2. After Extending it takes as State<Mywidget> inside the bracks
3. Then it override it and
4. Build the Widget and Return the Scaffold Widget/ or any widget
// now again go to first class
call this seccond class which we have create
1. First override your class
2. Then call the your class with createState Method and return it
--------------------------
class MyWidget extends StatefulWidget extends {
@override
MyWidgetState createState(){
return MyWidgetState();
}
0
Subscribe to my newsletter
Read articles from CHIRAG KUMAR directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
CHIRAG KUMAR
CHIRAG KUMAR
Full stack Developer