Member-only story

Why No One Can Get Flutter State, Lack Of Architecture

Fred Grott
6 min readFeb 3, 2022

--

Thinking that Provider is a state management solution, is a delusion that stems from the fact that most do not understand stateful widgets. We have a pattern of not understanding items such as OOP and SOLID and that moving up the chain to lack of architecture knowledge; and that manifests itself in thinking that any DI solution would be a state management solution.

State Pattern and Stateful Widgets

This is the Dart state pattern:

You have something that is mutable. Then a class to access and read the mutation. Now, the stateful widget is in fact that state pattern:

Now, let me clue you in to one of the disadvantage of imperative OOP. Notice that the widget has dependency to the state mutation. In imperative programming we deal…

--

--

Fred Grott
Fred Grott

No responses yet