Created
May 30, 2018 03:17
-
-
Save asialgearoid/28419a36b6b395eaf842fe63190107dc to your computer and use it in GitHub Desktop.
Todo App Step 1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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