- Added mounted check in _valueChanged() method to prevent "setState() called after dispose()" errors when asynchronous notifications arrive after widget removal from the tree.
- where
ReactiveViewModelBuilder
could attempt to update no longer available widgets, causing runtime exceptions, especially during integration tests. - Improved lifecycle management of listeners to prevent memory leaks and unexpected behaviors.
- Added new
ViewModel<T>
abstract class with robust lifecycle management, automatic reinitialization, and detailed diagnostic logging. - Implemented
ReactiveNotifierViewModel<VM, T>
to better encapsulate ReactiveNotifier's singleton management with ViewModels. - Added auto-dispose functionality to clean up resources automatically when a ViewModel is no longer in use.
- Enhanced
ReactiveViewModelBuilder
to support both traditionalStateNotifierImpl
and new ViewModel pattern. - Implemented
cleanCurrentNotifier()
,cleanupInstance()
, and cleanupByType()
methods to provide granular control over instance cleanup. - Added detailed error messages for ViewModel initialization, disposal, and state updates.
- Improved debugging with instance tracking, performance analytics, and detailed state change logging.
- Added comprehensive validations and safeguards to prevent state inconsistencies.
- Remove
debounce
on builder.
- Implement
updateSilently
onAsyncViewModelImpl
. - Format, etc.
- Implement
transformState
onAsyncViewModelImpl
andgetStateByKey
for ReactiveNotifier. - Format, etc.
- Implement
ReactiveViewModelBuilder
for complex state management.
- Some dart format.
- Update name of state and documentation for
StateNotifierImpl
.
-
Introducing
transformState
function for model editing, allowing state modifications at any nesting level. This function supports implementations likecopyWith
, enabling selective value updates in your models. -
Simplified state management: unified
notifier
and VM into a single approach usingReactiveBuilder
,ReactiveAsync
, andReactiveStream
. Access functions directly through notifier reference (e.g.,instance.notifier.replaceData(...)
). AccessReactiveAsync
data vianotifier.data
. -
Removed
ValueNotifier
value dependency, eliminating nested state update issues (previouslyinstance.value.value
, nowinstance.data
). -
Protected internal builder functions for improved encapsulation.
-
Maintained compatibility with
ListenableBuilder
forReactiveNotifier
. -
Removed
context
dependency from builder asReactiveNotifier
doesn't require it.
- Recommend using mixins to store related Notifiers, avoiding global variables and maintaining proper context encapsulation.
- Update documentation.
- Protected value for NotifierImpl.
- Added support for direct access to ReactiveNotifier value and simple state management
- New constructor
ReactiveBuilder.notifier
for simpler state cases - Improved type safety and handling of ViewModelState implementations
- For ViewModels/Complex States:
ReactiveBuilder( notifier: stateConnection.value, builder: (context, state, keep) => YourWidget() )
- For Simple States:
ReactiveBuilder.notifier( notifier: simpleNotifier, builder: (context, value, keep) => YourWidget() )
- Fixed state propagation in complex ViewModelState scenarios
- Improved debouncing mechanism for state updates
- Better memory management for kept widgets
- Added examples for both ViewModelState and simple state usage
- Updated documentation to reflect new constructor patterns
- Improved comments and code documentation
- Refactored internal state handling for better performance
- Optimized rebuilding patterns for kept widgets
- Enhanced type safety across the implementation
- No changes in dependencies
No breaking changes. Existing code will continue to work as expected. The new .notifier
constructor is additive and optional for simpler state management cases.
- Update example and doc on readme.
- Update documentations and images.
- Implement Ci for actions.
- Update Readme.
- Few bits, and name convention
- New
ViewModelStateImpl
for simple viewmodel state.
- Complete project architecture overhaul
- New reference handling system
- Changed how related states are managed
-
Enhanced Debugging System
- Improved error messages
- Better stack traces
- Detailed circular reference detection
-
Advanced State Management
- Support for nested ReactiveNotifier instances in related states
- Improved multiple reference handling
- Better state isolation and context management
-
Async & Stream Support
- Built-in async state handling
- Stream state management
- Automatic state synchronization
-
Extended Testing Support
- More test cases
- Better coverage
- Improved testing utilities
- Better performance in state updates
- Reduced memory footprint
- Improved type safety
- Enhanced error handling
- Better documentation
- Fixed issues with circular references
- Improved state cleanup
- Better error reporting
- Fixed memory leaks in complex state trees
- Complete documentation overhaul
- New examples and use cases
- Better API documentation
- Improved error messages
- Update documentation.
- Implement when and callback when finish setState.
- Help to execute any other params when change state
- Upgrade SDK.
- Add gif for visual context.
- Change name from
State
toNotify
. - Update golden test.
- Change name from
State
toNotify
. - Improve
README.md
.
- Initial version.