asp
2.0.3, released 2 years ago by flutterando.com.br
Atomic state management solution for Flutter apps.
WASM-ready
What it does
ASP (Atomic State Pattern) offers a state management system for Flutter based on atoms, actions, and selectors. It uses hook_state for state distribution and provides tracking for state changes.
AI-written summary of version 2.0.3, based on the package's README and metadata. Report an inaccuracy
Use it when
- You want a functional, atomic approach to state management in Flutter
- You want to track which actions modified specific atoms for debugging
- You prefer hooks for state distribution over traditional builders
Skip it when
- You prefer class-based state management patterns like Bloc
- You rely on pre-built reactive collections like RxList or RxMap which were removed in v2
Strengths
- Simplified and predictable state management API
- Detailed observability on state changes and triggering actions
- Functional approach with lowercase atom creation
Weaknesses
- Removed built-in reactive collections (RxList, RxSet, RxMap) in v2
- Breaking changes between v1 and v2 require migration effort
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 1
Not documented
final counter = atom(0);
AtomObserver.changes((status) {
print(status.atom);
print(status.action);
});Alternatives
Packages that do the same job and could replace asp.
Works with
Packages commonly used together with asp: ones it builds on, ones built on it, and its own family.