resource_state_builder library

Classes

MultiResourceBuilder<E>
A powerful builder widget that coordinates multiple Resource states into a single, unified view.
PaginatedData<T>
Contract that any paginated response should implement so the UI layer can work with it generically.
PaginatedResourceBuilder<T, P extends PaginatedData<T>, E>
Use the PaginatedResourceBuilder with hasInternalScroll: false to get a pure sliver that can be embedded directly inside an existing CustomScrollView.
PaginatedResourceDef<T, P extends PaginatedData<T>, E>
A configuration defining how a paginated Resource should be rendered within a MultiResourceBuilder.
Resource<T, E>
A generic UI state wrapper that represents the lifecycle of a resource (API call, local fetch, pagination, refresh, etc).
ResourceBuilder<T, E>
A widget that builds itself based on the state of a single Resource.
ResourceConfig<E>
Global configuration for ResourceBuilder and PaginatedResourceBuilder.
ResourceDef<T, E>
A configuration defining how a standard Resource should be rendered within a MultiResourceBuilder.

Extensions

ResourceAggregator on Iterable<Resource>
Aggregates multiple Resource instances into a single UI state.
ResourceExtension on Resource<T, E>
Convenience helpers to make UI & BLoC code more expressive.
ResourcePaginatedX on Resource<PaginatedData<T>, E>
ResourcePatterns on Resource<T, E>
Adds pattern-matching-related methods to Resource.