Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class ToDoListPage extends StatelessWidget {
- @override
- Widget build(BuildContext context) => StoreConnector<AppState, _ViewModel>(
- converter: (Store<AppState> store) => _ViewModel.create(store),
- builder: (BuildContext context, _ViewModel viewModel) => Scaffold(
- appBar: AppBar(
- title: Text(viewModel.pageTitle),
- ),
- body: ListView(children: viewModel.items.map((_ItemViewModel item) => _createWidget(item)).toList()),
- floatingActionButton: FloatingActionButton(
- onPressed: viewModel.onNewItem,
- tooltip: viewModel.newItemToolTip,
- child: Icon(viewModel.newItemIcon),
- ),
- ),
- );
- }
Add Comment
Please, Sign In to add comment