Deep Dive Into State

Fred Grott
Geek Culture
Published in
7 min readJul 28, 2021

--

Guess what the secret to understanding state in Flutter is? The state solutions came about in different groups working through what the widgets do and using OOP patterns to solve specific problems of state.

Google does not point this out, but if we just work through all the variants of using inherited widget; then we can gain insight into how each DI-and-state solution works.

Beginning State In Flutter

This set of articles has the source code in this location in the ddi inherited folder:

https://github.com/fredgrott/ddi_flutter/tree/master/arch/ddi_inherited

First up, let’s review some terms in viewing the standard Flutter Counter App:

Our first set of terms is Immutable and Mutable. Immutables cannot change are the least expensive items to create, whereas Mutables are more expensive to create and can change.

Now, I can introduce the Reactive term and how it’s implemented. Reactive simply means that we use Immutable instead of Mutables. Implementation wise, behind the scenes…

--

--