fetcher library

Classes

AsyncEditBuilder<T>
A widget that allow to fetch a value asynchronously, and then to run another task asynchronously (to commit new value for instance) while updating UI with new value. Handle all states (loading, errors, onSuccess). It's actually a mix of FetchBuilder and AsyncTaskBuilder combined. Typically used for component that needs to fetch a value and then edit that value. Example : an async switch
AsyncForm<T>
Wrapper around AsyncTaskBuilder adapted for form validation.
AsyncTaskBuilder<T>
A widget that allow to run an async task and handle all states (loading, errors, onSuccess).
BasicFetchBuilderController<R>
ClearFocusBackground
DataStream<T>
A broadcast Stream with access to the latest emitted value. Does explicitly NOT handle errors to provide a direct and simple access to the value.
DataStreamBuilder<T>
Widget that builds itself based on the latest value a DataStream.
DefaultFetcherConfig
EventFetchBuilder<T>
Widget that listen to a Stream and display data. It's like FetchBuilder but instead of directly calling a task once, it will listen to a stream and his updates. Handle all possible states: loading, loaded, errors.
EventSnapshot<T>
EventStream<T>
A broadcast Stream with access to the latest emitted value, with error handling.
EventStreamBuilder<T>
Widget that builds itself based on the latest value a EventStream.
FetchBuilder<T, R>
Widget that fetch data asynchronously, and display it when available. Handle all possible states: loading, loaded, errors.
FetchBuilderControllerBase<T, R>
A controller for an FetchBuilder.
FetcherConfig
PagedData<T, P>
PagedListViewFetcher<T, P>
A widget that fetch a paginated list of data, page by page. Handle all states (loading, errors, onSuccess). Initially just fetch first page, then fetch next page when user scrolls. T is the type of the data. P is the type of the pageId (usually String or int).
ParameterizedFetchBuilderController<T, R>
ValueStream<T>
Abstract base class for a broadcast Stream with access to the latest emitted value.

Functions

isNullable<T>() bool
Whether the specified type is nullable.

Typedefs

AsyncTaskChildBuilder<T> = Widget Function(BuildContext context, TaskRunnerCallback<T> runTask)
DataEditWidgetBuilder<T> = Widget Function(BuildContext context, T value, ValueSetter<T> commit)
DataWidgetBuilder<T> = Widget Function(BuildContext context, T value)
Signature for strategies that build widgets based on provided data
ParameterizedAsyncTask<T, R> = Future<R> Function(T? param)
TaskRunnerCallback<T> = void Function([AsyncValueGetter<T>? task])
ValueGetter<R, T> = R Function(T value)