stated_result_builder library
Classes
- ActionResult
- A type represents the result of an action.
- ActionResultBuilder
- Widget that builds itself based on the value of ActionResult or AsyncActionResult
- AsyncActionResult
- A type represents the result of a async action.
-
AsyncQueryResult<
T> - A type represents the result of a async query.
-
EmptySafeBuilder<
T> - A builder widget invoke different builder based on whether value is empty or not.
- FailedState
- State indicates the action is failed with error
-
FailedValueState<
T> - State indicates the action is failed with error, and a value
- IdleState
- State indicates the action haven't started yet
-
IdleValueState<
T> - State indicates the action haven't started yet, with a value
-
OnState<
TS extends Stated> -
Describe a pattern to test against Stated when whether it is a
TS
with extra criteria OnState.matches returnstrue
if pattern matches. -
QueryResult<
T> - A type represents the result of an query.
-
QueryResultBuilder<
T> - Widget that builds itself based on the value of QueryResult or AsyncQueryResult
- SucceededState
- State indicates the action is completed successfully
-
SucceededValueState<
T> - State indicates the action is completed successfully with value
- WorkingState
- State indicates the action is in progress
-
WorkingValueState<
T> - State indicates the action is in progress, with a value
Mixins
Extensions
- ActionResultFutureExtension on Future
-
Provides extension methods on
Future
for ActionResult -
QueryResultFutureExtension
on Future<
T> -
Provides extension methods on
Future<T>
for QueryResult - StatedMatchExtension on Stated
Typedefs
-
EmptyChecker<
T> = bool Function(T value) -
Fuction returns
true
ifvalue
is empty - StatedPredict = bool Function(Stated stated)
-
Determine whether
stated
matches or not -
StateTransformer<
TR> = TR Function() -
ValueTransformer<
T, TR> = TR Function(T value) - Transformer for state with value