fetcher library

Classes

AsyncEditBuilder<T>
A widget that allow to fetch a value asynchronously, and then to run another task asynchronously (to submit new value for instance) while updating UI with new value. Handle all states (loading, errors, onSuccess). It's actually a mix of FetchBuilder and SubmitBuilder combined. Typically used for component that needs to fetch a value and then edit that value. DON'T use this if fetch and submit tasks are not related (prefer using separate FetchBuilder and SubmitBuilder). Example : an async switch, that fetch the current value, and then can submit the new value.
BasicFetchBuilderController<R>
DefaultFetcherConfig
EventFetchBuilder<T>
Widget that listen to an EventStream 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.
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
Configuration for fetcher widgets.
FetchErrorData
Fetch error data
FetchException
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>
SubmitBuilder<T>
A widget that allow to run an async task and handle all states (loading, errors, onSuccess). Design for tasks that is triggered by a user action (like a button press).
SubmitFormBuilder<T>
Wrapper around SubmitBuilder with automatic form validation.

Typedefs

DataEditWidgetBuilder<T> = Widget Function(BuildContext context, T value, ValueSetter<T> submit)
SubmitChildBuilder<T> = Widget Function(BuildContext context, TaskRunnerCallback<T> runTask)
TaskRunnerCallback<T> = void Function([AsyncValueGetter<T>? task])