joker_state library

Classes

AsyncDisposable
Interface for asynchronous disposable resources
CircusRing
A lightweight dependency injection container for Flutter applications
Cue
Optional base class for all cue events.
CueGate
The cue gatekeeper: delays or limits repetitive callbacks based on mode.
CueMaster
The base interface for event bus.
Disposable
Interface for disposable resources If you want to auto dispose your instance by CircusRing, you can mix this in
Joker<T>
Joker - A lightweight, locally reactive state container with auto-dispose capability.
JokerCast<T>
A widget that listens to a provided Joker<T> from the widget tree using JokerPortal, and rebuilds when the state changes.
JokerFrame<T, S>
JokerFrame - A widget that observes a derived slice of a Joker's state.
JokerPortal<T>
JokerPortal injects a Joker<T> into the widget tree.
JokerReveal
A conditional widget that reveals one of two widgets based on condition.
JokerStage<T>
JokerStage - A widget that observes a single Joker and rebuilds on full state changes.
JokerTrap
A widget that safely handles the disposal of controllers when removed from the tree.
JokerTroupe<T extends Record>
JokerTroupe - Combines multiple Jokers using Dart Records into a single widget.
Presenter<T>
Presenter - Complex state management and business logic controller
PresenterTroupe<T extends Record>
PresenterTroupe - Combines multiple Presenters using Dart Records into a single widget.
RingCueMaster
An RxDart-based implementation of CueMaster.
RxEffect<T>
An internal widget that runs side effects when RxInterface state changes
RxInterface<T>
RxInterface - Base reactive state management interface

Enums

CueGateMode
Modes for how CueGate operates.

Mixins

CueGateMixin<T extends StatefulWidget>
Provides debounce / throttle capabilities inside a StatefulWidget.
LifeCycleMixin

Extensions

CircusRingCueMasterExtension on CircusRing
CircusRingFindx on CircusRing
Extension for finding and retrieving dependencies from CircusRing
CircusRingFirex on CircusRing
Extension for removing dependencies from CircusRing
CircusRingHirex on CircusRing
Extension for registering dependencies in the CircusRing
CircusRingTagFindx on CircusRing
Extension for tag-based operations in CircusRing
JokerContextX on BuildContext
Extension on BuildContext for convenient access to Jokers via JokerPortal.
JokerEffectExtension on Joker<T>
Extension methods on Joker to support side-effect listeners. Usage:
JokerFrameExtension on Joker<T>
Extension for Joker to easily create a JokerFrame widget.
JokerListenerExtension on Joker<T>
Extension methods on Joker to support side-effect listeners.
JokerRevealExtension on bool
JokerRingExtension on CircusRing
Extension methods to integrate Jokers with CircusRing for dependency injection.
JokerStageExtension on Joker<T>
Extension for Joker to easily create a JokerStage widget.
JokerTroupeExtension on List<Joker>
Extension for List of Jokers to quickly create a JokerTroupe widget.
PresenterEffectExtension on Presenter<T>
Extension methods on Presenter to support side-effect listeners. Usage:
PresenterFrameExtension on Presenter<T>
Extension for Presenter to easily create a StreamBuilder with a selector.
PresenterPairExtension on (Presenter<T1>, Presenter<T2>)
Extension to create typesafe record troupes for the most common combinations
PresenterStageExtension on Presenter<T>
Extension for Presenter to easily create a StreamBuilder widget.
PresenterTroupeExtension on List<Presenter>
Extension method to easily create a Troupe from Presenters using record patterns.
Trapeze on Object
Extension that allows controllers to be auto-disposed.
TrapezeArtist on List<Object>
Extension for combining multiple controllers to be disposed.

Properties

Circus CircusRing
Global access point for the CircusRing dependency injection container
no setter
Ring CircusRing
You can choose the alias you like to access the CircusRing instance
no setter

Typedefs

AsyncFactoryFunc<T> = Future<T> Function()
A function that asynchronously creates an instance of type T
FactoryFunc<T> = T Function()
A function that creates an instance of type T
JokerCastBuilder<T> = Widget Function(BuildContext context, T value)
Signature for a builder function inside a JokerCast.
JokerFrameBuilder<S> = Widget Function(BuildContext context, S selected)
Builder function for JokerFrame.
JokerFrameSelector<T, S> = S Function(T state)
Selector function for JokerFrame.
JokerListenCondition<T> = bool Function(T? previous, T current)
A predicate to determine whether to trigger a JokerListener.
JokerListener<T> = void Function(T? previous, T current)
--- DEPRECATED API --- A side-effect callback triggered when Joker state updates.
JokerStageBuilder<T> = Widget Function(BuildContext context, T state)
Builder function for JokerStage.
JokerTroupeBuilder<T> = Widget Function(BuildContext context, T states)
Builder function for JokerTroupe.
JokerTroupeConverter<T> = T Function(List states)
Converter function for JokerTroupe.
PresenterTroupeBuilder<T extends Record> = Widget Function(BuildContext context, T states)
Builder function for PresenterTroupe.
PresenterTroupeConverter<T extends Record> = T Function(List states)
Converter function for PresenterTroupe.
RxListenCondition<T> = bool Function(T? previous, T current)
A predicate to determine whether to trigger a RxListener.
RxListener<T> = void Function(BuildContext context, T state)
A side-effect callback triggered when RxInterface state updates.

Exceptions / Errors

CircusRingException
JokerException