
Flutter App Architecture: The Application Layer
15 min read
Service classes are the ideal place to store logic that depends on multiple data sources or repositories. Let's explore them by building a shopping cart feature.
Service classes are the ideal place to store logic that depends on multiple data sources or repositories. Let's explore them by building a shopping cart feature.
How to implement controller classes that can hold business logic, manage widget state, and interact with repositories in the data layer.
If you have many StateNotifier subclasses, using try/catch can be tedious. With AsyncValue.guard you get the same result with less boilerplate.
An introduction to a new App Architecture based on Riverpod, and comparison with other popular ones such as MVC, MVVM, Bloc, Stacked & Clean Architecture.
The AsyncValue class from the Riverpod package offers a much nicer API compared to AsyncSnapshot from the FutureBuilder and StreamBuilder widgets. Here's how to use it.
When performing asynchronous work, we need to account for loading and error states in our UI. This article presents simple and reusable approach to handle this across multiple screens.
How to implement a responsive layout in Flutter by using a split view on large screens and drawer navigation on mobile.
A complete guide to the Riverpod package for Flutter state management. Included: core concepts & how to use all the available providers. Updated to Riverpod 1.0.
How to create a reusable widget class that helps us when working with asynchronous data from Riverpod providers.
A detailed overview of a production-ready architecture that I've fine-tuned over the last two years. You can use the included starter project as the foundation for your Flutter & Firebase apps.