joker_state 4.2.0+4
joker_state: ^4.2.0+4 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.
4.2.0+4 #
- fix format analysis issue
- make Presenter being abstract, and adjusting setter
4.2.0+3 #
- fix format analysis issue
4.2.0+2 #
- fix export missing issues
4.2.0+1 #
- update README
4.2.0 #
BREAKING CHANGES
- Refactored
RingCueMaster,Joker, andPresenterto remove theRxDartdependency, now using Dart's nativeStreamController.broadcast. - Provide a
JokerActabstract class for customizable usage. - Integrate widget APIs, add
JokerRehearse. - Add provider package for context way to using Joker/Presenter.
- Updated all docs to reflect the removal of
RxDartand added examples for usingCueGatewith the event bus. - Updated documentation for
JokerRingandCircusRingto clarify the use cases for context-based and context-less dependency injection.
4.1.0 #
- Make Joker support keepAlive flag again.
- Make Joker support whisper/batch API again.
- Make Joker support debug tag again.
- Add Joker debug log in constructor/dispose.
4.0.0 #
BREAKING CHANGES
CircusRingis now a standalone package. While still usable in JokerState, it no longer provides Joker-specific integration. Please use circus_ring.RingCueMasternow leveragesrx_dartfor a more robust Event Bus system.JokerStageandJokerFrameconstructors are now private. Please use theperformandfocusOnAPIs instead.- Both
JokerandPresenterare now based onRxInterface, providing more flexible and efficient state management. RxInterfaceis built onBehaviorSubjectand internally usesTimerfor improved autoDispose handling.JokerPortalandJokerCastare deprecated. For non-context state management, use CircusRing API withPresenter.JokerRevealis deprecated. Use Dart's native language features for conditional rendering.JokerTrapis deprecated. UsePresenter'sonDoneorStatefulWidget'sdisposefor controller management.
3.1.1 #
- Fix RingCueMaster regirestration issue
3.1.0 #
- Missing export for new Presenter features.
3.0.0 #
BREAKING CHANGES
CircusRingDisposal Logic forJoker/Presenter:CircusRingmethods (fire,fireByTag,fireAll,fireAsync) now actively manage the disposal of removedJokerandPresenterinstances.- When a
JokerorPresenteris removed via these methods,CircusRingwill now call itsdispose()method UNLESS the instance'skeepAliveproperty is set totrue. - This is a significant change from v2.x where
CircusRingnever initiated the disposal ofJokerinstances (lifecycle was purely self-managed by Joker based on listeners). - Ensure your application logic correctly handles this new disposal behavior, especially for instances previously expected to persist after being removed from
CircusRingwithoutkeepAlive: true.
New Features
- Added
Presenter<T>Class: Introduced an abstract classPresenter<T>extendingJoker<T>. It provides a standard lifecycle (onInit,onReady,onDone) suitable for controllers or presenters in Flutter applications, integrating state management with lifecycle events. - Added
PresenterExtensions: Added extension methods.perform()and.focusOn()to simplify usingPresenterinstances withJokerStageandJokerFramewidgets respectively.
2.1.1 #
- fix CHANGELOG.md typo
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)