Skip to content

Instantly share code, notes, and snippets.

@thekarel
Last active August 9, 2019 15:58
Show Gist options
  • Save thekarel/92233630d0863f248ee6159b247f8017 to your computer and use it in GitHub Desktop.
Save thekarel/92233630d0863f248ee6159b247f8017 to your computer and use it in GitHub Desktop.
Flutter app starter
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'My App',
home: MyHomePage(),
);
}
}
class MyHomePage extends StatefulWidget {
MyHomePage({Key key}) : super(key: key);
@override
_MyHomePageState createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text('My App')),
body: SafeArea(child: Text('This is the homepage')),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment