AFAsyncQuery<TResponse> class
abstract
Superclass for a kind of action that queries some data asynchronously, then knows how to process the result.
- Inheritance
-
- Object
- AFObjectWithKey
- AFActionWithKey
- AFAsyncQuery
- Implementers
Constructors
-
AFAsyncQuery({AFID? id, AFOnResponseDelegate<
TResponse> ? onSuccess, AFOnErrorDelegate? onError, AFPreExecuteResponseDelegate<TResponse> ? onPreExecuteResponse, int? simulatedLatencyFactor})
Properties
- conceptualStore ↔ AFConceptualStore
-
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → AFID?
-
finalinherited
- key → String
-
no setterinherited
- lastStart ↔ int?
-
getter/setter pair
- onError → AFOnErrorDelegate?
-
final
-
onPreExecuteResponse
→ AFPreExecuteResponseDelegate<
TResponse> ? -
final
-
onSuccess
→ AFOnResponseDelegate<
TResponse> ? -
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- simulatedLatencyFactor → int?
-
final
Methods
-
createSuccessContextForResponse(
{required AFDispatcher dispatcher, required AFState state, required TResponse response, required bool isPreExecute}) → AFFinishQuerySuccessContext< TResponse> -
currentMillis(
) → int -
finishAsyncWithError(
AFFinishQueryErrorContext context) → void - The default implementation calls the error handler specified in your xxx_define_core.dart file.
-
finishAsyncWithErrorAF(
AFFinishQueryErrorContext context) → void -
finishAsyncWithResponse(
AFFinishQuerySuccessContext< TResponse> context) → void - Called when the asynchronous process completes with a response It should merge the results into the state (preserving immutability by making copies of the relevant portions of the state using copyWith), and then use the dispatcher to call set actions for any modified state elements.
-
finishAsyncWithResponseAF(
AFFinishQuerySuccessContext< TResponse> context) → void - Called internally by the framework to do pre and post processing before finishAsyncWithResponse
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
retargetStore(
AFConceptualStore target) → void -
startAsync(
AFStartQueryContext< TResponse> context) → void - Called at the start of an asynchronous process, starts the query using data from the command.
-
startAsyncAF(
AFDispatcher dispatcher, AFStore store, {required Completer< AFFinishQuerySuccessContext> ? completer, void onResponseExtra(dynamic)?, void onErrorExtra(dynamic)?}) → void - Called internally when redux middleware begins processing a query.
-
testFinishAsyncWithError(
AFStateTestContext context, AFQueryError error) → void - Called during testing to simulate results from an asynchronous call.
-
testFinishAsyncWithResponse(
AFStateTestContext context, TResponse response) → void - Called during testing to simulate results from an asynchronous call.
-
throwUnimplemented(
) → Never -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited