
Flutter App Architecture: The Presentation Layer
12 min read
How to implement controller classes that can hold business logic, manage widget state, and interact with repositories in the data layer.
How to implement controller classes that can hold business logic, manage widget state, and interact with repositories in the data layer.
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.
An overview of Flutter's built-in widgets for managing state, along with links to the best resources from the official Flutter documentation.
Mutating state or calling async code inside the build method can cause unwanted widget rebuilds and unintended behaviour. Here are some examples and rules to follow.
Mixing UI and logic inside Flutter widgets is bad. Here's how to refactor a simple app for better separation of concerns, immutability, and type safety using Freezed & State Notifier.
A comparison of different state management techniques, using a simple authentication flow as an example.
This article introduces a new architectural pattern that I often use in my Flutter Apps. It is inspired by BLoCs and RxVMS.
How to implement a Firebase-backed multiple-counter app with different state management techniques. Evaluation of their tradeoffs.