Skip to content

Instantly share code, notes, and snippets.

@asialgearoid
Created May 30, 2018 03:17
Show Gist options
  • Save asialgearoid/28419a36b6b395eaf842fe63190107dc to your computer and use it in GitHub Desktop.
Save asialgearoid/28419a36b6b395eaf842fe63190107dc to your computer and use it in GitHub Desktop.
Todo App Step 1
// Import MaterialApp and other widgets which we can use to quickly create a material app
import 'package:flutter/material.dart';
// Code written in Dart starts exectuting from the main function. runApp is part of
// Flutter, and requires the component which will be our app's container. In Flutter,
// every component is known as a "widget".
void main() => runApp(new TodoApp());
// Every component in Flutter is a widget, even the whole app itself
class TodoApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new MaterialApp(
title: 'Todo List',
home: new Scaffold(
appBar: new AppBar(
title: new Text('Todo List')
)
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment