bloc_signals_flutter library
Flutter bindings and UI integrations for the reactive BlocSignal library.
Provides BlocSignalProvider, MultiBlocSignalProvider,
BlocSignalBuilder, BlocSignalListener, MultiBlocSignalListener,
BlocSignalConsumer, and BlocSignalSelector to bridge reactive states
with the Flutter widget tree.
Classes
-
BlocSignal<
Event, StateType> - A synchronous state management container integrating BLoC design patterns with Rody Davis's signals v7.
-
BlocSignalBase<
StateType> - A base contract for all reactive state containers.
-
BlocSignalBuilder<
T extends BlocSignalBase< S> , S> - A widget that rebuilds dynamically when the state of a BlocSignal changes.
-
BlocSignalConsumer<
T extends BlocSignalBase< S> , S> - A widget that combines a BlocSignalBuilder and BlocSignalListener into one.
-
BlocSignalListener<
T extends BlocSignalBase< S> , S> - A widget that listens to a BlocSignal and runs a callback when its state updates.
- BlocSignalListenerSingleChildWidget
-
An interface for BlocSignalListener widgets that can be merged by
MultiBlocSignalListenerinto a single linear widget hierarchy. - BlocSignalObserver
- An observer interface to watch all BlocSignalBase instances' lifecycles, transitions, and events.
-
BlocSignalProvider<
T extends BlocSignalBase> - A Flutter widget that provides a BlocSignal to its descendants via the element tree and automatically disposes of it when the provider is removed from the tree.
- BlocSignalProviderSingleChildWidget
- An interface for BlocSignalProvider widgets that can be merged by MultiBlocSignalProvider into a single linear widget hierarchy.
-
BlocSignalSelector<
T extends BlocSignalBase< S> , S, V> - A widget that filters rebuilds of its subtree by selecting a sub-value of the BlocSignal state.
- BlocTelemetryKeys
- Standard telemetry event names emitted by built-in concurrency transformers and operational diagnostic pipelines.
-
Change<
State> - A Change represents the change from one state to another.
- CompositeBlocSignalObserver
- A composite BlocSignalObserver that broadcasts lifecycle notifications to multiple inner observers in the order they were registered.
-
ComputedOptions<
T> -
Configuration options for a
Computedextendingsignals.ComputedOptions. -
CubitSignal<
StateType> - A clean base class for method-driven state management.
- DevToolsBlocSignalObserver
-
A BlocSignalObserver that broadcasts container lifecycle events to the
Dart VM service via developer.postEvent under
bloc_signal.*event kinds and registers VM Service RPC extensions via DevToolsService. - DevToolsHistoryEntry
- A recorded history entry for a container transition or error.
- DevToolsService
- Registry and service manager for Dart VM Service RPC extensions.
-
FutureBlocSignal<
StateType> -
A reactive state container wrapper that adapts an underlying Dart Future
into a BlocSignalBase holding raw state of type
StateType. -
ListenableBlocSignal<
T> - A reactive state container wrapper that adapts an underlying Flutter Listenable into a BlocSignalBase.
- MultiBlocSignalListener
- A widget that merges multiple BlocSignalListeners into a single linear widget hierarchy to improve readability.
- MultiBlocSignalProvider
- A widget that merges multiple BlocSignalProviders into a single linear widget hierarchy to improve readability.
- Mutex
- An asynchronous mutual exclusion lock.
-
ReadonlySignalOptions<
T> -
Configuration options for a
ReadonlySignalextendingsignals.ReadonlySignalOptions. -
SignalBlocSignal<
StateType> -
A reactive state container wrapper that adapts an underlying
ReadonlySignal(for example aSignal,Computed,FutureSignal,StreamSignal, orAsyncSignal) into a BlocSignalBase. -
SignalEquality<
T> - Defines the equality check algorithm used by signals to determine if a new value actually differs from the current value.
-
SignalOptions<
T> -
Configuration options for a
Signalextendingsignals.SignalOptions. -
StreamBlocSignal<
StateType> - A reactive state container wrapper that adapts an underlying Dart Stream (for example, legacy BLoC, Cubit, or RxDart stream) into a BlocSignalBase.
-
Transition<
Event, State> - A Transition represents the change from one state to another triggered by an event.
Mixins
-
BlocSignalMixin<
Event, StateType> - A mixin providing event-driven state container capabilities for any BlocSignalBase class.
-
CubitSignalMixin<
StateType> - A mixin providing reactive state container capabilities for any Dart class.
Extensions
- BlocSignalProviderExtension on BuildContext
- Helper extension on BuildContext to access BlocSignal instances.
-
BlocSignalStreamExtension
on BlocSignalBase<
StateType> - Extension methods on BlocSignalBase to convert reactive state emissions into a standard Dart multi-subscription Stream.
-
BlocSignalValueListenableX
on BlocSignalBase<
T> - Extension methods on BlocSignalBase for Flutter ValueListenable conversion.
-
EventTransformerExtension
on EventTransformer<
E, StateType> - Extension methods for converting between transformer representations.
-
FutureBlocSignalExtension
on Future<
T> - Extension methods on Future to create BlocSignalBase containers.
- ListenableBlocSignalX on Listenable
- Extension methods on Flutter Listenable for BlocSignalBase conversion.
-
ReadonlySignalBlocSignalExtension
on ReadonlySignal<
StateType> -
Extension methods on
ReadonlySignalto create BlocSignalBase containers. -
StreamBlocSignalExtension
on Stream<
StateType> - Extension methods on Stream to create BlocSignalBase containers.
-
ValueListenableBlocSignalX
on ValueListenable<
T> - Extension methods on Flutter ValueListenable for BlocSignalBase conversion.
Functions
-
droppable<
E, StateType> ({BlocSignalBase? bloc}) → EventTransformer< E, StateType> - Returns an EventTransformer that drops incoming events if a handler for that event type is currently executing.
-
emitContainerTelemetry(
BlocSignalBase bloc, String name, {Object? event, Map< String, dynamic> ? metadata}) → void -
Emits operational telemetry diagnostics on
blocfrom custom or built-in concurrency transformers. -
restartable<
E, StateType> ({BlocSignalBase? bloc}) → EventTransformer< E, StateType> - Returns an EventTransformer that allows new incoming events to supersede previous in-flight handler executions, dropping state emissions from older executions.
-
sequential<
E, StateType> ({BlocSignalBase? bloc}) → EventTransformer< E, StateType> - Returns an EventTransformer that queues incoming events and processes them sequentially in FIFO order using a Mutex.
Typedefs
-
BlocEventTransformer<
E, StateType> = FutureOr< void> Function(BlocSignalBase<StateType> bloc, E event, EventHandler<E, StateType> handler, void emit(StateType state)) -
A transformer function signature for controlling concurrency and execution
flow with access to the host
blocinstance. -
BlocSignalSelectorOptions<
V> = Object - Base options type accepted by BlocSignalSelector.options, compatible with ComputedOptions, ReadonlySignalOptions, and SignalOptions.
-
EventHandler<
E, StateType> = FutureOr< void> Function(E event, void emit(StateType state)) -
A function handler signature for processing event
Eand emitting state updates. -
EventTransformer<
E, StateType> = FutureOr< void> Function(E event, EventHandler<E, StateType> handler, void emit(StateType state)) - A transformer function signature for controlling concurrency and execution flow of an EventHandler.