flutter_value_notifier
1.6.0, released 2 years ago by robsonsilva.dev
Flutter widgets that implement state management patterns using ValueNotifier.
What it does
Provides a set of widgets inspired by flutter_bloc such as ValueNotifierProvider, ValueNotifierBuilder, and ValueNotifierListener to make working with ValueNotifier cleaner and reduce boilerplate in state management.
AI-written summary of version 1.6.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You want to manage app state using standard ValueNotifiers with a bloc-like widget structure.
- You want dependency injection for ValueNotifiers down the widget tree.
- You want to separate presentation from business logic using ValueNotifier and builder/listener widgets.
Skip it when
- You prefer a full-fledged state management framework like Riverpod or Bloc for complex asynchronous events.
- You already use ValueListenableBuilder and do not need extra provider/listener wrapper widgets.
Strengths
- Familiar API for developers coming from flutter_bloc.
- Reduces boilerplate when working with ValueNotifier compared to raw ValueListenableBuilder.
- Lightweight and built directly on core Flutter foundations.
Weaknesses
- ValueNotifier can become cumbersome for complex multi-state logic compared to dedicated state management packages.
- Relies on provider underneath for context lookups.
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 2
ValueNotifierProvider(
create: (_) => CounterNotifier(),
child: CounterPage(),
);Alternatives
Packages that do the same job and could replace flutter_value_notifier.
- flutter_bloc
If you need a more robust and formalized event-driven state management architecture.
86Compare - flutter_riverpod
If you want compile-safe global state management without relying on widget context.
93Compare
Works with
Packages commonly used together with flutter_value_notifier: ones it builds on, ones built on it, and its own family.