
Singletons in Flutter: How to Avoid Them and What to do Instead
12 min read
An introduction to singletons in Flutter: what problems they solve, what other ones they introduce, and what are their alternatives.
An introduction to singletons in Flutter: what problems they solve, what other ones they introduce, and what are their alternatives.
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.
An overview of the feature-first and layer-first approaches when choosing a project structure for medium/large Flutter apps, along with their tradeoffs and common pitfalls.
An introduction to a new App Architecture based on Riverpod, and comparison with other popular ones such as MVC, MVVM, Bloc, Stacked & Clean Architecture.
An introduction to the domain model and its role in defining entities and the business logic for manipulating them in the context of Flutter app architecture.
An in-depth overview of the repository pattern in Flutter: what it is, when to use it, and various implementation strategies along with their tradeoffs.
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.