Member-only story

Listenable Builder As Data Binder

Fred Grott
3 min readJun 12, 2023

--

One of the new tools to use notifiers with simple models to consume rather than stateful widgets is the Listenable Builder class. In Flutter State Management it’s always modeling, some way to observer them, and then some way to data bind the data to the view. Which of course is not really highlighted in the flutter docs. And of course that is why you are reading this and following me.

In this article, I will show how easy it is to use with a change notifier example.

The Listenable Builder Example

First, we need a listenable, which in this case is a change notifier:

A builder does two things. One, it supplies a layout. Two, it supplies a piece of data:

While, one could use a stateful widget to consumer the listenable, that would mean that we

--

--

Fred Grott
Fred Grott

No responses yet