drip library

Classes

AsyncData<T>
A successful result of an asynchronous operation.
AsyncDrip<T>
A Drip specialised for asynchronous data: it owns an AsyncState of T and provides run to execute a Future<T> while emitting the expected Loading -> Data | Error sequence automatically.
AsyncError<T>
A failure case for an asynchronous operation.
AsyncIdle<T>
The initial, untouched state of an AsyncDrip.
AsyncLoading<T>
An asynchronous operation is in flight.
AsyncState<T>
The state of an asynchronous computation owned by an AsyncDrip.
ComputedDrip<S>
A Drip whose state is derived from one or more source drips.
Drip<DState>
Minimal Cubit-style state holder.
DripObserver
Global hook invoked for every Drip lifecycle event.
Dripper<D extends Drip<DState>, DState>
A consumer widget that rebuilds whenever its Drip emits a new state, and optionally fires a side-effect listener.
Dripping<D extends Drip<DState>, DState>
A listener-only widget: it subscribes to the Drip's Drip.stateStream and invokes listener on each distinct state, but does not rebuild its child on state changes.
DripProvider<D extends Drip<Object?>>
A convenience provider that lazily creates a Drip via create and exposes it to descendants the same way a Dropper does.
Dropper<D extends Drip<Object?>>
Provides a Drip instance to the widget subtree via an InheritedWidget. Descendants retrieve the drip with Dropper.of, Dropper.read, Dropper.watch, or the BuildContext.read / BuildContext.watch extensions.
DropWidget<D extends Drip<DState>, DState, SelectedState>
A consumer widget that rebuilds only when the value picked by selector changes.
MultiProvider
Composes several Dropper (or other SingleChildStatelessWidget) providers without nested indentation.

Extensions

DripProviderX on BuildContext
Dropper extension help to access the Drip methods using the context

Typedefs

DBuilder<D extends Drip<DState>, DState> = Widget Function(D drip, DState state)
A builder that receives the Drip instance and its current state.
DCreate<D> = D Function(BuildContext context)
A factory that builds a Drip given the current BuildContext.
DListener<D extends Drip<Object?>, DState> = void Function(D drip, DState state)
A side-effect callback invoked when a Drip emits a new state.
SBuilder<D extends Drip<Object?>, SelectedState> = Widget Function(D drip, SelectedState data)
A builder that receives the Drip instance and the value picked by a Selector.
Selector<DState, T> = T Function(DState state)
A function that picks a slice of DState of type T.

Exceptions / Errors

ProviderError