joker_state 2.1.0
joker_state: ^2.1.0 copied to clipboard
Joker is a lightweight, reactive state management solution for Flutter that brings the fun of the circus to your codebase with simple, flexible, and type-safe state handling.
2.1.0 #
BREAKING CHANGES
- CircusRing Disposal: Major changes to how resources are disposed.
Circus.fireAll()is now asynchronous (Future<void>) and handles both synchronous (Disposable,ChangeNotifier) and asynchronous (AsyncDisposable) disposal for non-Joker instances. Update calls toawait Circus.fireAll().Circus.fireAllAsync()has been removed. Useawait Circus.fireAll()instead.Circus.fire()andCircus.fireByTag()now throw aCircusRingExceptionif attempting to synchronously dispose anAsyncDisposableinstance. UsefireAsync()orfireAsyncByTag()for these cases.Circus.dispose()is now asynchronous (Future<void>) due to the changes infireAll(). Update calls toawait Circus.dispose().
- Tests Updated: Tests related to CircusRing disposal (
circus_ring_test.dart,circus_ring_reactive_test.dart, examples) have been updated to reflect the new asynchronousfireAlland removal offireAllAsync. - Documentation Updated: README files (
README-di-*.md) and documentation comments updated forfireAll,fireAllAsync,fire,fireByTag, anddisposemethods.
2.0.3 #
- Major update: All README files (Chinese and English) have been rewritten for a more conversational, developer-friendly tone.
- Documentation is now easier to read, with clearer explanations and practical examples.
- No breaking changes; all APIs and features remain the same.
2.0.2 #
- Update example usage in README
2.0.1 #
- Update README
2.0.0 #
BREAKING CHANGES
- Joker Lifecycle:
- Removed
autoDisposeparameter fromJoker,JokerStage,JokerFrame, andJokerTroupe. - Added
keepAliveparameter toJoker(default:false). Joker instances now automatically schedule disposal viaFuture.microtaskwhen they have no listeners unlesskeepAliveistrue. - Adding a listener cancels the scheduled disposal.
- Removed
- CircusRing Disposal:
CircusRingmethods (fire,fireByTag,fireAll,fireAsync,fireAllAsync, internal_deleteSingle*) now perform conditional disposal. They only dispose non-Joker instances that implementDisposable,AsyncDisposable, orChangeNotifier.CircusRingno longer automatically disposesJokerinstances upon removal (e.g., viaCircus.vanish). Joker lifecycle is self-managed based on listeners andkeepAlive.
- Tests Updated: Tests related to Joker lifecycle and CircusRing disposal have been updated to reflect the new behavior.
- Documentation: README files updated to reflect lifecycle and disposal changes.
- Fixed dependency check logic in
CircusRing.fireandCircusRing.fireByTagto correctly use the_dependentsmap. - Improved documentation in
JokerPortalregarding the necessity of usingtagwhen dealing with common types.
1.2.2 #
- fix Circus.ringMaster cannot find correct CueMaster error
1.2.1 #
- Update README.md
1.2.0 #
- CueGate(Debouncer/throttler) added
- CueGateMixin for StatefulWidget
1.1.1 #
- fix lint warning
- remove useless test case
1.1.0+2 #
- adjusting key condition way in CircusRing
1.1.0+1 #
- make Circus.ringMaster() can be use with CustomCueMaster
1.1.0 #
- RingCueMaster(event bus) support
- JokerTrap(auto-dispose controllers) support
- JokerReveal(conditional display) support
- Update README
- Add Example for RingCueMaster
1.0.3 #
- make JokerPortal/JokerCast can be link to Joker by tag
1.0.2+2 #
- fix export missing
1.0.2+1 #
- fix lint warning
1.0.1 #
- feat: add fenix support to CircusRing
- Add examples/tests
1.0.0 #
- Initial release
- Joker, JokerCast, JokerFrame, JokerListener, JokerPortal, JokerStage, JokerTroupe (State Management)
- CircusRing (Dependency Injection)