ApiLoadResult<T> class
Result of an API load operation.
Constructors
- ApiLoadResult.failure(String errorMessage)
-
Creates a failure result with an optional
errorMessage.factory - ApiLoadResult.success(T data)
-
Creates a successful result carrying
data.factory - ApiLoadResult.timeout()
-
Creates a timeout result.
factory
Properties
- data → T?
-
The loaded data, available when success is true.
final
- errorMessage → String?
-
Error message, available when success is false.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- success → bool
-
Whether the load operation succeeded.
final
- timedOut → bool
-
Whether the failure was due to a timeout.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited