Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Hello World in Flutter
import "package:flutter/material.dart";
void main() {
runApp(MaterialApp(home: MyApp(), debugShowCheckedModeBanner: false));
}
class MyApp extends StatefulWidget {
@override
_MyAppState createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
@override
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.white,
body: Container(
alignment: Alignment.center,
child: Text(
"Hello World",
style: TextStyle(
color: Colors.red, fontSize: 30, fontWeight: FontWeight.bold),
),
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment