Skip to content

Instantly share code, notes, and snippets.

@kleinlennart
Last active May 24, 2018 17:37
Show Gist options
  • Select an option

  • Save kleinlennart/643ffa00b29a93eb97c60736d575dbd8 to your computer and use it in GitHub Desktop.

Select an option

Save kleinlennart/643ffa00b29a93eb97c60736d575dbd8 to your computer and use it in GitHub Desktop.
Default Flutter App Setup
import 'package:flutter/material.dart';
class HomePage extends StatefulWidget {
@override
_HomePageState createState() => new _HomePageState();
}
class _HomePageState extends State<HomePage> {
@override
void initState() {
// TODO: implement initState
super.initState();
}
@override
Widget build(BuildContext context) {
return new Scaffold(
appBar: new AppBar(
title: new Text("AppBar Title"),
),
body: new FlutterLogo(size: 200.0),
);
}
}
import 'package:flutter/material.dart';
import './home.dart';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new MaterialApp(
theme: new ThemeData(primarySwatch: Colors.blue),
debugShowCheckedModeBanner: false,
title: 'Recent App Title',
home: new HomePage());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment