bon_notifiers library

Classes

AsyncListenable<T>
An interface for asynchronous data sources that notify listeners about changes.
AsyncListenableBuilder<T>
A widget that builds itself based on the state of an AsyncListenable.
AsyncNotifier<T>
A concrete implementation of AsyncListenable.

Mixins

ErrorNotifier
Mixin for handling error state.
LoadingNotifier
Mixin for handling loading state.

Typedefs

AsyncListenableErrorBuilder<T> = Widget Function(BuildContext context, Object error, Widget? child)
Signature for building a widget from an error.
AsyncListenableResultBuilder<T> = Widget Function(BuildContext context, T result, Widget? child)
Signature for building a widget from a successful result.
ResultUpdateFunction<T> = T Function(T result)
A function that takes the current result of type T and returns an updated result. Useful for performing transformations or updates in a functional style.
WarnFunction = void Function(Object error)
A function that handles warnings or errors. Receives an Object representing the error.

Exceptions / Errors

BonError