OfflineOperation<T extends DataModel<T>> class

Represents an offline request that is pending to be retried.

Constructors

OfflineOperation({required String offlineKey, required DataRequestType requestType, required String request, Map<String, String>? headers, String? body, OnRawData? onSuccess, OnDataError? onError, required _RemoteAdapterOffline<T> adapter})
const
OfflineOperation.fromJson(Map<String, dynamic> json, _RemoteAdapterOffline<T> adapter)
factory

Properties

adapter → _RemoteAdapterOffline<T>
final
body String?
final
hash String
no setter
hashCode int
The hash code for this object.
no setterinherited
headers Map<String, String>?
final
metadata String
Metadata format: _offline:users:d7bcc9a7b72bf90fffd826
no setter
method DataRequestMethod
no setter
model → T?
This getter ONLY makes sense for findOne and save operations
no setter
offlineKey String
final
onError OnDataError?
final
onSuccess OnRawData?
final
props List<Object?>
The list of properties that will be used to determine whether two instances are equal.
no setter
request String
final
requestType DataRequestType
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stringify bool
If set to true, the toString method will be overridden to output this instance's props.
no setter
uri Uri
no setter

Methods

add() → void
Adds an edge from the _offlineAdapterKey to the key for save/delete and stores header/param metadata. Also stores callbacks.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
remove() → void
Removes all edges from the _offlineAdapterKey for current metadata, as well as callbacks from memory.
retry<R>() Future<void>
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited