Skip to content

Instantly share code, notes, and snippets.

@peekpt
Created August 24, 2018 18:25
Show Gist options
  • Save peekpt/e696bedf03bbb134297d4d87b10d64ab to your computer and use it in GitHub Desktop.
Save peekpt/e696bedf03bbb134297d4d87b10d64ab to your computer and use it in GitHub Desktop.
Flutter Starter Code
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
title: 'App Name',
theme: ThemeData(
primarySwatch: Colors.purple,
),
home: RootPage(title: 'Root Title'),
);
}
}
class RootPage extends StatefulWidget {
RootPage({Key key, this.title}) : super(key: key);
final String title;
@override
_RootPageState createState() => _RootPageState();
}
class _RootPageState extends State<RootPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(widget.title),
),
body: Container(),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment