Skip to content

Instantly share code, notes, and snippets.

@pjbelo
Created January 20, 2022 16:31
Show Gist options
  • Save pjbelo/f33cad71a9dd6611ca6cc08f1e52cae3 to your computer and use it in GitHub Desktop.
Save pjbelo/f33cad71a9dd6611ca6cc08f1e52cae3 to your computer and use it in GitHub Desktop.
Hello Flutter World
import 'package:flutter/material.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
debugShowCheckedModeBanner: false,
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: const MyHomePage(title: 'Flutter Demo Home Page'),
);
}
}
class MyHomePage extends StatelessWidget {
final String title;
const MyHomePage({Key? key, required this.title}) : super(key: key);
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(title),
),
body: const Center(
child: Text('Hello World of Flutter!'),
));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment