flutter_state_notifier
1.0.0, released 3 years ago by an unverified publisher
Flutter bindings for state_notifier, providing StateNotifierProvider and StateNotifierBuilder.
What it does
It connects StateNotifier objects to the Flutter widget tree using provider integration. It allows creating and disposing notifiers as well as rebuilding UI when the state changes.
AI-written summary of version 1.0.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You want to manage state using state_notifier in a Flutter app
- You need StateNotifierProvider to integrate with provider
Skip it when
- You use modern state management libraries like Riverpod or Bloc instead
Strengths
- Simple integration with the provider ecosystem
- Automatic disposal of StateNotifier instances
Weaknesses
- Dependent on older state_notifier and provider architectures
- Not documented with advanced features beyond basic widgets
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 3
MultiProvider(
providers: [
StateNotifierProvider<MyStateNotifier, MyState>(create: (_) => MyStateNotifier()),
],
)Alternatives
Packages that do the same job and could replace flutter_state_notifier.
- flutter_bloc
Uses a robust stream-based architecture for state management and UI rebuilding.
86Compare - flutter_riverpod
A modern evolution of provider and state_notifier that is safer and more robust.
93Compare
Works with
Packages commonly used together with flutter_state_notifier: ones it builds on, ones built on it, and its own family.