Basic Page
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
DbHelper helper = DbHelper();
return MaterialApp(
title: 'Todos',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: MyHomePage(title: 'Todos'),
);
}
}
class MyHomePage extends StatefulWidget {
MyHomePage({Key key, this.title}) : super(key: key);
final String title;
@override
_MyHomePageState createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
return new Scaffold(
appBar: new AppBar(
title: new Text(widget.title),
),
body: TodoList(),
);
}
}
Comentarios
Publicar un comentario