Loading topic
async/await, and Future. It also assumes you can build StatelessWidget and StatefulWidget classes and have felt setState get unwieldy in a large widget. The chapter shows where each piece of an MVVM app lives. Later chapters build each piece in6 min readChangeNotifier tells widgets that its state changed. It assumes you know basic Dart (classes, async/await, Futures), the difference between StatelessWidget and StatefulWidget, and why setState gets hard to manage i4 min readasync/await, StatefulWidget, and why setState gets hard to manage in larger widgets. It also assumes you have seen that a view model extends ChangeNotifier and calls notifyListeners. The focus here is the shape of the state a view model exposes5 min readfinal fields and const constructors. It also assumes you have read the earlier chapters on view models and repositories. Here you will look closely at the model that the repository returns and the view model exposes. You will see why the model should n5 min readTodo and TodoRepository types. You should also be comfortable with async/await and with catching exceptions in Dart. The examples use the http and shared_preferences packages, 4 min readTodo model from the earlier chapters, and that a view model extends ChangeNotifier. It covers what a repository owns, how it differs from a service, and how to build one that caches data and keeps it consistent.5 min readChangeNotifier, using the todo example from the rest of the tutorial. It assumes you know Dart classes, async/await, Future, and the difference between `StatelessWidget6 min readChangeNotifier, exposes state through getters, and calls notifyListeners() after each change. You should also be comfortable with StatefulWidget, initState, and BuildContext. Here you connect that 4 min readTodoListViewModel built on ChangeNotifier, a TodoRepository interface, and a view that rebuilds through ListenableBuilder, as in the earlier chapters. You should be comfortable with async/await, try/catch/finally, and Dart 3 sealed classes and `switc5 min readChangeNotifier and rebuilt a view with ListenableBuilder, as in the earlier chapters. It also assumes you know Future, async/await, and the Todo and TodoRepository types from the running todo example.5 min readasync/await, know the difference between StatelessWidget and StatefulWidget, and have seen a view model built on ChangeNotifier. It uses the Todo, TodoRepository, and TodoListViewModel types from earlier chapters.5 min readasync/await, StatefulWidget lifecycle methods (initState, dispose), and the TodoListViewModel and TodoRepository from the earlier chapters. The 4 min readChangeNotifier exposes state, how loading and error flags work, and how a view rebuilds with ListenableBuilder. Here you will replace the hand-written flags with a small reusable class.4 min readTodo model, the TodoRepository interface, and TodoListViewModel in front of you. It also assumes you are comfortable with async/await, ChangeNotifier, and Provider. Here you will learn the mistakes that most often bre5 min read