A widget whose content stays synced with a list of Listenable.
-
Add the as a dependency in your project with
flutter pub add multi_listenable -
Import
package:multi_listenable/multi_listenable.dartin required files. -
Use
MultiValueListenableBuilderin your widget tree :
MultiListenableBuilder(
listenable: [ /* your listables to listen */],
builder : (context) => Container(),
)
An iterable of [Listenable] to listen. When one of the listenable notify, the builder function is called.
A function to call every time a [Listener] passed in [listenable] notify.
An exemple can be found here