valuable
2.0.0, released 5 months ago by maximefauberteau.dev
A graph‑based state‑management library that lets you rebuild parts of the UI without many StatefulWidgets.
WASM-ready
What it does
Valuable lets you create independent state nodes (Valuables) that can depend on each other and notify listeners when they change. It works both inside and outside the widget tree, using ChangeNotifier under the hood.
AI-written summary of version 2.0.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need fine‑grained local state updates without scattering many StatefulWidgets
- You want a graph‑like dependency system for state that can be scoped to a widget or view
Skip it when
- You prefer a global provider solution like Riverpod
- You need code‑generation based state management or built‑in DI
Strengths
- Graph‑based dependencies allow selective rebuilds
- Works both inside and outside Flutter widget tree
- No code‑generation required
Weaknesses
- Requires manual disposal of each Valuable
- Limited ecosystem compared to more popular solutions
- No built‑in DI or code‑gen features
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 1
final counter = StatefulValuable<int>(0);
counter.addListener(() => print('value: ${counter.getValue()}'));
counter.setValue(1);Alternatives
Packages that do the same job and could replace valuable.