David Gonzalez
May 28, 2023

--

Hi,

What you have done already exist since Flutter v1... It's called ValueListenable.

Moreover your solution create a singleton, so it will work with only one kind of data... Which seems to be a bad idea. Check InheritedWidget to understand how observer/observable should be handled in Flutter 😉

--

--

David Gonzalez
David Gonzalez

Written by David Gonzalez

Hi, I’m David, a french mobile applications developer. As a freelance, I work on Android and iOS applications since 2010. I also work on Flutter now !

Responses (1)