air_state 1.0.7 copy "air_state: ^1.0.7" to clipboard
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 the AirStateKey<T> instance, guaranteeing the preservation of the explicit generic type T and ensuring strictly typed state initialization.

1.0.6 #

Improvements #

  • AirPulse Callable Shorthand: AirPulse<T> is now a callable class. Use AuthPulses.clearMessages(null) instead of AuthPulses.clearMessages.pulse(null). The explicit .pulse() method remains available for backward compatibility.

1.0.5 #

Improvements #

  • AirListener: Introduced the AirListener widget for handling one-off side effects (navigation, SnackBars) reactively without triggering UI rebuilds. This component promotes better separation of concerns and keeps the widget build methods pure.

1.0.4 #

Bug Fixes #

  • Fixed silent data loss in StatePersistence._serialize(): Custom model objects with toJson() or toMap() methods now serialize correctly. Previously, the existence check obj.toJson != null always threw NoSuchMethodError (swallowed by a catch), causing all custom models to fall back to .toString() — making restore impossible. Now calls toJson()/toMap() directly inside a try-catch.
  • Fixed subscription leaks in AirState.dispose(): Simplified the disposal logic to a single try { (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:async import from air_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 canAccess method to AirDelegate to validate state access permissions.
    • Updated AirBuilder to check for access permissions before building.
    • Added sourceId tracking to AirDelegate.subscribe and AirState event listeners.
  • API Improvements:
    • AirBuilder, AirBuilder2, and AirBuilder3 now accept callerModuleId for better dependency tracking.
    • Updated AirDelegate interface 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.
2
likes
160
points
64
downloads

Documentation

API reference

Publisher

verified publisherandrey-d-araya.dev

Weekly Downloads

A lightweight, modular state management library for the Air Framework.

Repository (GitHub)
View/report issues

Topics

#state-management #reactive #flutter #air

License

MIT (license)

Dependencies

collection, flutter, meta

More

Packages that depend on air_state