state_lifecycle_observer 0.0.3 copy "state_lifecycle_observer: ^0.0.3" to clipboard
state_lifecycle_observer: ^0.0.3 copied to clipboard

A reusable Flutter state observer pattern implementation.

0.0.3 #

  • Enhancement: Introduced safeSetState in LifecycleObserver to handle state updates safely across different scheduler phases.
  • Fix: FutureObserver and StreamObserver now use safeSetState to prevent errors when updates are triggered during build, layout, or paint phases.
  • Docs: Reorganized README to clearly categorize built-in observers (Base, Widget, Anim) and added clarification on key usage.

0.0.2 #

  • Breaking Change: Renamed onUpdate to onDidUpdateWidget to better align with Flutter's lifecycle naming.
  • Breaking Change: Removed onInit. Initialization logic should be moved to the constructor or buildTarget.
  • Enhancement: Added safety assertion to ensure state mixes in LifecycleObserverMixin.
  • Docs: Updated README with key usage explanation and new API examples.

0.0.1 #

  • Initial release.
  • Added LifecycleObserver base class and LifecycleObserverMixin.
  • Included common observers:
    • AnimControllerObserver (supports full AnimationController params)
    • ScrollControllerObserver
    • TabControllerObserver
    • TextEditingControllerObserver
  • Implemented automatic lifecycle management (onInit, onUpdate, onDispose).
  • Seamless integration via super.build(context).
2
likes
0
points
45
downloads

Publisher

unverified uploader

Weekly Downloads

A reusable Flutter state observer pattern implementation.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on state_lifecycle_observer