import 'package:flutter/material.dart';
void main(){
runApp(MyApp()); //MyApp is custom widget
//flutter also have build in widget
}
//Type Stl (StatelessWidget) for generation below class code
//Will auto suggest
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
//return Container();
//using MaterialApp cz Android support MaterialApp
return MaterialApp(
//home:Text("Hello World"),
home:Scaffold( //Scaffold is widget
//body:Text("Hello World"),
body:Center( //Center is widget
child:Text("Hello World"), //Text is widget
),
),
);
}
}
0 Comments