microstate 1.0.0
microstate: ^1.0.0 copied to clipboard
A lightweight, reactive state management solution for Flutter applications with built-in history tracking, validation, debouncing, and throttling capabilities.
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
1.0.0 2024-01-XX #
Added #
- Initial release of microstate package
ValueState<T>class for reactive state managementstate()function for creating basic state containersstateWithHistory()function for state with undo/redo capabilitiesstateWithValidation()function for state with validationstateAsync()function for async state managementObserver<T>widget for automatic UI updates- Built-in debouncing and throttling capabilities
- History tracking with configurable max history size
- Extension methods for common operations (increment, decrement, toggle)
- Type-safe API with full generic support
- Comprehensive test coverage
- Example application demonstrating usage
Features #
- Reactive State Management: Automatic UI updates when state changes
- History Tracking: Built-in undo/redo functionality with configurable history size
- Validation: Optional value validation before state updates
- Debouncing: Control update frequency for frequent changes
- Throttling: Limit update frequency for high-frequency events
- Widget Integration: Seamless integration with Flutter widgets via Observer
- Type Safety: Full type safety with generics
- Lightweight: Minimal overhead and dependencies
Technical Details #
- Extends
ChangeNotifierfor Flutter integration - Uses
Timerfor debouncing and throttling - Implements proper disposal to prevent memory leaks
- Provides unmodifiable history access
- Supports async operations
- Includes comprehensive documentation and examples