OfflineOperation<T extends DataModelMixin<T> > constructor
OfflineOperation<T extends DataModelMixin<T> > ({})
Implementation
OfflineOperation({
required this.label,
required this.httpRequest,
required this.timestamp,
this.headers,
this.body,
String? key,
this.onSuccess,
this.onError,
required this.adapter,
}) {
this.key = key ?? label.model?._key;
if (this.key != null) {
final model = adapter.findOneLocal(this.key);
if (model != null) {
label.model = model;
}
}
}