air_state 1.0.7
air_state: ^1.0.7 copied to clipboard
A lightweight, modular state management library for the Air Framework.
Changelog #
1.0.7 #
Architecture Improvements #
- Strong Type Retention in AirListener: Improved the generic type resolution mechanism when iterating over
List<AirStateKey>. Controller resolution now utilizes dynamic dispatch directly on theAirStateKey<T>instance, guaranteeing the preservation of the explicit generic typeTand ensuring strictly typed state initialization.
1.0.6 #
Improvements #
- AirPulse Callable Shorthand:
AirPulse<T>is now a callable class. UseAuthPulses.clearMessages(null)instead ofAuthPulses.clearMessages.pulse(null). The explicit.pulse()method remains available for backward compatibility.
1.0.5 #
Improvements #
- AirListener: Introduced the
AirListenerwidget for handling one-off side effects (navigation, SnackBars) reactively without triggering UI rebuilds. This component promotes better separation of concerns and keeps the widgetbuildmethods pure.
1.0.4 #
Bug Fixes #
- Fixed silent data loss in
StatePersistence._serialize(): Custom model objects withtoJson()ortoMap()methods now serialize correctly. Previously, the existence checkobj.toJson != nullalways threwNoSuchMethodError(swallowed by a catch), causing all custom models to fall back to.toString()— making restore impossible. Now callstoJson()/toMap()directly inside a try-catch. - Fixed subscription leaks in
AirState.dispose(): Simplified the disposal logic to a singletry { (sub as dynamic).cancel() } catch (_) {}block. The previous implementation had unreachable branches and silently swallowed cancellation errors, leaving subscriptions alive after dispose. - Removed unused
dart:asyncimport fromair_state_base.dart.
1.0.3 #
- Visual Identity: Added the official Air Framework SVG logo.
- Documentation: Updated README with the new logo and visual assets.
1.0.2 #
- Security & Access Control:
- Added
canAccessmethod toAirDelegateto validate state access permissions. - Updated
AirBuilderto check for access permissions before building. - Added
sourceIdtracking toAirDelegate.subscribeandAirStateevent listeners.
- Added
- API Improvements:
AirBuilder,AirBuilder2, andAirBuilder3now acceptcallerModuleIdfor better dependency tracking.- Updated
AirDelegateinterface signature
1.0.1 #
- Updated examples and internal documentation links.
1.0.0 #
- Initial release of
air_state. - Core reactive state management (
AirController,Air). - Typed state keys support (
AirStateKey). - Widget builders (
AirBuilder,AirView). - Helper extensions for Tuples.