OfflineOperation<T extends DataModelMixin<T>> constructor

OfflineOperation<T extends DataModelMixin<T>>({
  1. required DataRequestLabel label,
  2. required String httpRequest,
  3. required int timestamp,
  4. Map<String, String>? headers,
  5. String? body,
  6. String? key,
  7. _OnSuccessGeneric<T>? onSuccess,
  8. _OnErrorGeneric<T>? onError,
  9. required RemoteAdapter<T> adapter,
})

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;
}