QueryResult<TParsed extends Object?> class
A single operation result
Constructors
-
QueryResult({required BaseOptions<
TParsed> options, Map<String, dynamic> ? data, OperationException? exception, Context context = const Context(), required QueryResultSource source}) -
factory
-
QueryResult.internal({Map<
String, dynamic> ? data, OperationException? exception, Context context = const Context(), required ResultParserFn<TParsed> parserFn, required QueryResultSource? source}) -
QueryResult.loading({required BaseOptions<
TParsed> options, Map<String, dynamic> ? data}) -
factory
-
QueryResult.optimistic({required BaseOptions<
TParsed> options, Map<String, dynamic> ? data}) -
factory
Properties
- context ↔ Context
-
Response context. Defaults to an empty
Context()
getter/setter pair -
data
↔ Map<
String, dynamic> ? -
Response data
getter/setter pair
- exception ↔ OperationException?
-
getter/setter pair
- hasException → bool
-
Whether the response includes an exception
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- isConcrete → bool
-
data has been specified and is not an QueryResultSource.optimisticResult
no setter
- isLoading → bool
-
data has yet to be specified from any source
for the most recent operation
(including QueryResultSource.optimisticResult)
no setter
- isNotLoading → bool
-
data been specified (including QueryResultSource.optimisticResult)
no setter
- isOptimistic → bool
-
data has been specified as an QueryResultSource.optimisticResult
no setter
- parsedData → TParsed?
-
If a parserFn is provided, this getter can be used to fetch the parsed data.
no setter
-
parserFn
↔ ResultParserFn<
TParsed> -
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- source ↔ QueryResultSource?
-
The source of the result data.
getter/setter pair
- timestamp ↔ DateTime
-
getter/setter pair
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
-
unexecuted
→ QueryResult<
Never> -
Unexecuted singleton, used as a placeholder for mutations,
etc.
final