Member-only story

Get Rid Of Stateful Widgets, Listenable Models

Fred Grott
4 min readJul 29, 2021

--

This is your first pattern of getting rid of the Stateful Widgets using Inherited Model and Listenables. Just like previous articles, I am showing a full app boilerplate setup. So let m e show you how things are set up.

My Project SetUp

The source code is in the inherited_model_example subfolder here:

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

My pubspec is:

And since I am using a specific lint package, dart code metrics, and localizations my analysis options YAML file has to be set up like this:

Then the main file to have catcher, build variants, and app exceptions set up is:

--

--

Fred Grott
Fred Grott

No responses yet