super_qubit library

Classes

BaseQubit
Non-generic base class for Qubits to allow unified management.
Emitter<State>
Emitter for emitting new states.
EventHandlerConfig
Configuration for event handlers.
InheritedSuperQubitProvider<T extends SuperQubit>
Internal InheritedWidget for providing the SuperQubit.
MultiSuperQubitProvider
A widget that provides multiple SuperQubits to its descendants.
Qubit<Event, State>
Base class for state management with event handling.
QubitBuilder<Q extends BaseQubit, S>
A widget that listens to a Qubit and rebuilds when the state changes. A Flutter widget that builds itself based on the latest state of a Qubit.
QubitConsumer<Q extends BaseQubit, S>
A Flutter widget that both builds and listens to a Qubit.
QubitListener<Q extends BaseQubit, S>
A Flutter widget that listens to state changes in a Qubit.
SuperQubit
A SuperQubit manages multiple child Qubits and can intercept their events.
SuperQubitProvider<T extends SuperQubit>
A widget that provides a SuperQubit to its descendants.

Extensions

QubitDualContextExtensions on BuildContext
Extensions for dual-type lookup (SuperQubit and child Qubit).
QubitSingleContextExtensions on BuildContext
Extensions for single-type lookup (SuperQubit only).
QubitStateExtensions on BuildContext
Additional helper extensions for state access.

Functions

ignoreWhenChildDefines<T>() EventHandlerConfig
Creates a configuration that ignores the handler when the specified child defines one.
ignoreWhenParentDefines() EventHandlerConfig
Creates a configuration that ignores the handler when parent defines one.

Typedefs

EventHandler<Event, State> = FutureOr<void> Function(Event event, Emitter<State> emit)
Signature for event handlers.
ParentEventHandler<Event, State> = FutureOr<void> Function(Event event, Emitter<State> emit)
Signature for parent-level event handlers. These handlers take the event and an emitter to allow modifying the child's state.