multi_value_listenable_builder
0.0.2, released 5 years ago by an unverified publisher
A Flutter widget that allows listening to multiple ValueListenables simultaneously.
What it does
It provides a single widget, MultiValueListenableBuilder, which accepts a list of ValueListenables and a builder callback. When any of the provided listenables change, the builder triggers a rebuild with the updated values.
AI-written summary of version 0.0.2, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to rebuild a widget when any of multiple ValueListenables changes
- You want to avoid deeply nesting multiple ValueListenableBuilders
Skip it when
- You are using a heavy state management solution like BLoC, Riverpod, or Provider that already handles multiple values
- You only need to listen to a single ValueListenable
Strengths
- Simplifies code by eliminating nested ValueListenableBuilders
- Lightweight with no external dependencies other than Flutter
Weaknesses
- Limited to basic ValueListenable observation
- Does not provide complex state management features or business logic patterns
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
MultiValueListenableBuilder(
valueListenables: [
listenable0,
listenable1,
],
builder: (context, values, child) {
return YourWidget(
values.elementAt(0),
values.elementAt(1),
child: child,
);
},
child: YourOptionalChildWidget(),
)Alternatives
Packages that do the same job and could replace multi_value_listenable_builder.
- flutter_fullscreen
API to toggle fullscreen mode on web, desktop, and mobile Flutter apps
61Compare - valuable
A graph‑based state‑management library that lets you rebuild parts of the UI without many StatefulWidgets.
60Compare - dataflow
A reactive state management library for Flutter using DataStore, DataAction, and streams.
51Compare