Skip to content

Instantly share code, notes, and snippets.

@asialgearoid
Created May 30, 2018 03:18
Show Gist options
  • Save asialgearoid/ff08c85458fd5ce783bea6fb1b3c05de to your computer and use it in GitHub Desktop.
Save asialgearoid/ff08c85458fd5ce783bea6fb1b3c05de to your computer and use it in GitHub Desktop.
Todo App Step 2 (Stateful)
// Import MaterialApp and other widgets which we can use to quickly create a material app
import 'package:flutter/material.dart';
void main() => runApp(new TodoApp());
class TodoApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new MaterialApp(
title: 'Todo List',
home: new TodoList()
);
}
}
class TodoList extends StatefulWidget {
@override
createState() => new TodoListState();
}
class TodoListState extends State<TodoList> {
@override
Widget build(BuildContext context) {
return 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