live_cells
0.34.1, released 2 months ago by gutev.dev
A simpler, more flexible reactive replacement for ChangeNotifier and ValueNotifier.
What it does
Live Cells is a reactive programming library for Flutter that provides 'cells' to hold state. It supports functional computed cells, two-way data flow, automated resource management without dispose calls, and a built-in library of widgets for effortless data binding.
AI-written summary of version 0.34.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You want a simpler alternative to ChangeNotifier or ValueNotifier with built-in functional computed cells.
- You need two-way data binding between UI elements and state variables.
- You want effortless state restoration with minimal boilerplate.
Skip it when
- You prefer a strictly one-way data flow unidirectional architecture like BLoC.
- You are heavily invested in an existing state management ecosystem like Riverpod or Provider.
Strengths
- Supports two-way data flow out of the box.
- No need to manually add and remove listeners or call dispose.
- Cells are unobtrusive and feel like normal values.
- Integrated widget library allows seamless data binding.
Weaknesses
- Relatively new ecosystem compared to mature solutions like Provider or BLoC.
- Requires using its own specialized widget wrappers (like LiveTextField, LiveSwitch) for direct property binding.
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 3
Compatible with Flutter 3.41.0 and above. Optional code generation available via live_cell_extension.
final a = MutableCell(0);
final b = MutableCell(1);
final sum = a + b;
CellWidget.builder(() => Text('${a()} + ${b()} = ${sum()}'));Alternatives
Packages that do the same job and could replace live_cells.
- provider
You want a classic, widely adopted dependency injection and state management solution based on InheritedWidget.
81Compare - riverpod
You want compile-safe, robust provider-like dependency injection without relying on context.
99Compare - bloc
You require a strict, predictable state machine architecture based on streams and events.
92Compare