mirror of
https://github.com/nisrulz/flutter-examples.git
synced 2025-07-15 02:46:03 +08:00
Add new flutter example of todo app with provider (#78)
This commit is contained in:
25
todo_list_using_provider/lib/views/home.dart
Normal file
25
todo_list_using_provider/lib/views/home.dart
Normal file
@ -0,0 +1,25 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../widgets/todo_list_wdt.dart';
|
||||
import '../widgets/add_button.dart';
|
||||
|
||||
class MyHomePage extends StatelessWidget {
|
||||
final String title;
|
||||
|
||||
const MyHomePage({Key key, this.title}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
print('rebuilding Home View');
|
||||
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text(title),
|
||||
),
|
||||
body: Center(
|
||||
child: TodoListWdt(),
|
||||
),
|
||||
floatingActionButton: AddButton(),
|
||||
);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user