Guest User

Untitled

a guest
Apr 23rd, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. class ToDoListPage extends StatelessWidget {
  2. @override
  3. Widget build(BuildContext context) => StoreConnector<AppState, _ViewModel>(
  4. converter: (Store<AppState> store) => _ViewModel.create(store),
  5. builder: (BuildContext context, _ViewModel viewModel) => Scaffold(
  6. appBar: AppBar(
  7. title: Text(viewModel.pageTitle),
  8. ),
  9. body: ListView(children: viewModel.items.map((_ItemViewModel item) => _createWidget(item)).toList()),
  10. floatingActionButton: FloatingActionButton(
  11. onPressed: viewModel.onNewItem,
  12. tooltip: viewModel.newItemToolTip,
  13. child: Icon(viewModel.newItemIcon),
  14. ),
  15. ),
  16. );
  17. }
Add Comment
Please, Sign In to add comment