Posts

Showing posts from March, 2025

Minimal #1 - the UI state

Image
 Overview I assume you're aware of Minimal , and you want to use it to implement a scalable and maintainable architecture. I also assume you (may) have watched my presentation about Flutter Architecture Components . In this post I'd like to show you the first step, where you want to define the UI state. It could be done also the other way around, starting from the data layer and then implementing everything until you reach the UI and its state, but empirically I found out that starting from a well defined UI state will help you to reason better about your code. The code of the Pokemon app can be found here . State, in brief With Minimal you have 3 players: a state a notifier which holds your state a manager which allows you to access your notifier A state can be anything, from a single primitive to a very complex class. When the state contains the information needed for a UI to build, it's called a UI state. There are 2 types of UI states: ephemeral state app state You can ...

Minimal #0 - Getting started

Image
 Overview In this post I'll show you how to quickly get started with Minimal , a minimalistic state management package in the context of an MVN (Model View Notifier) architecture. This is only a very brief intro to get you started. I'll expand each step in details in follow-up posts State Management in 4 Steps Adam was on spot when he wrote : I never really checked the documentation because it’s so simple and easy to use. You don’t need to read everything to start building your app. Just create an immutable class, a state holder, a manager, and use the class in your UI. It’s truly minimal in every sense! and if you've already some basic experience with other state management solutions, you'll pick this up real fast. In case you don't, or in case you're confused, there are only 4 basic steps you need to follow to start structuring your architecture. I'll summarise them here, but they're also in the README, and the package comes with an example app which s...