Slide 28
Slide 28 text
Redux
class TimeTablePage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return StoreConnector(
onInit: (store) => store.dispatch(SessionsLoadAction()),
distinct: true,
converter: _ViewModel.fromStore,
builder: (context, vm) {
if (vm.isLoading) {
return Center(child: LoadingIndicator());
} else {
return TimeTable(
sessions: vm.sessions,
);
}
}, 28