Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

stateless widget

cannot change its own element


it does not have state
you should add build method

statefull widget

it has to have state managment class


it should have link
build method
can change behavior of its element
keywords
runapp
import material app
stateless or statefull
Scafold-layaout mobile design
build method-build context-it will hold all the data(location,property)
home-which class will appear first
appBar(title holder)
body(below appbar)

stateless widget creation

void main() {
runApp(MaterialApp(
home: MyApp(),
));
}

//stateless widget
// step1: create ststeless widget and imlplement it
class MyApp extends StatelessWidget {
//build methoid
@override
Widget build(BuildContext context) {
// TODO: implement build
return Text('hello');
}
}

You might also like