OfflineOperation<T extends DataModelMixin<T>> class

Represents an offline request that is pending to be retried.

Constructors

OfflineOperation({required DataRequestLabel label, required String httpRequest, required int timestamp, Map<String, String>? headers, String? body, String? key, _OnSuccessGeneric<T>? onSuccess, _OnErrorGeneric<T>? onError, required RemoteAdapter<T> adapter})
OfflineOperation.fromJson(DataRequestLabel label, Map<String, dynamic> json, RemoteAdapter<T> adapter)
factory

Properties

adapter RemoteAdapter<T>
final
body String?
final
hashCode int
The hash code for this object.
no setterinherited
headers Map<String, String>?
final
httpRequest String
final
key String?
latefinal
label DataRequestLabel
final
method DataRequestMethod
no setter
model → T?
no setter
onError → _OnErrorGeneric<T>?
final
onSuccess → _OnSuccessGeneric<T>?
final
props List<Object?>
The list of properties that will be used to determine whether two instances are equal.
no setter
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
timestamp int
final
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
retry() Future<void>
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

metadataFor(DataRequestLabel label) String
Metadata format: _offline:findOne/users#3@d7bcc9
remove(DataRequestLabel label, RemoteAdapter<DataModelMixin> adapter) → void
Removes all edges from the _offlineAdapterKey for current metadata, as well as callbacks from memory.