response_builder library
Key types
- Data Source
- Request - Listenable data source for 3-state asynchronous data
- ResultListenable and ResultNotifier - Listenable data source for 2-state synchronized data
- Build Protocols
- BuildAsyncSnapshot - This protocol enable BuildAsyncSnapshotActions to consume 3-state data from Future, Stream or Request
- BuildResult - This protocol enable enables BuildResultListenable to consume 2-state data from ResultListenable
- BuildValue - This protocol enable enables BuildValueListenable to consume value from ValueListenable
- WithEmptyValue - Protocol implement BuildValue.buildValue contract, which enables building actions to handle empty value
- Build Actions
- BuildAsyncSnapshotActions - Actions run on BuildAsyncSnapshot protocol to consume 3-state
AsyncResult
data from Future, Stream or Request, - BuildResultListenable - Actions run on BuildResult protocol, to consume 2-state
Result
from ResultListenable - BuildValueListenable - Actions run on BuildValue protocol, to consume value from ValueListenable
- BuildAsyncSnapshotActions - Actions run on BuildAsyncSnapshot protocol to consume 3-state
Classes
- DefaultBuildActions
- Default building actions that used by BuildResultListenable and BuildAsyncResult
-
HistoryValueNotifier<
T> - A ValueListenable implementation that kept the history of the changes
-
Request<
T> - Request is a listenable data source that loads data in either synchronous or asynchronous manner.
-
ResultListenable<
T> - An interface for subclasses of Listenable that expose a result.
-
ResultNotifier<
T> - ResultNotifier is just like ValueNotifier but support to hold error along with value.
Mixins
-
BuildAsyncResult<
T> - Protocol that builds 3-state async result, which can be:
-
BuildAsyncSnapshot<
T> - Protocol that builds 3-state async result from a Future, a Stream or a Request
-
BuildResult<
T> - Protocol that builds 2-state sync result, which could be either a value or an error BuildResult implements BuildValue
-
BuildValue<
T> - Protocol that builds value
- BuildWithBuilder
- BuildWithBuilderInLocalContext
-
WithEmptyValue<
T> - Protocol to build data which potentially could be empty
Extensions
- BuildAsyncSnapshotActions
- BuildResultListenable
- Actions that depends on Protocol BuildResult
- BuildValueListenable
- Actions that depends on Protocol ValueListenable
Typedefs
-
AsyncValueUpdater<
T> = Future< T> Function(T current) - Contract of asynchronous value updater
-
ErrorFixer<
T> = T Function(Object error) - Contract of error fixer
-
ValueUpdater<
T> = T Function(T current) - Contract of synchronous value updater
-
ValueWidgetBuilder<
T> = Widget Function(BuildContext context, T value)