modify method

Response<T> modify({
  1. T? data,
  2. List<T>? backups,
  3. List<T>? ignores,
  4. List<T>? result,
  5. double? progress,
  6. Status? status,
  7. String? exception,
  8. String? message,
  9. dynamic feedback,
  10. dynamic snapshot,
})

Implementation

Response<T> modify({
  T? data,
  List<T>? backups,
  List<T>? ignores,
  List<T>? result,
  double? progress,
  Status? status,
  String? exception,
  String? message,
  dynamic feedback,
  dynamic snapshot,
}) {
  status ??= (data != null || result != null)
      ? Status.ok
      : (exception ?? '').isNotEmpty
          ? Status.error
          : null;
  _data = data ?? _data;
  _backups = backups ?? _backups;
  _ignores = ignores ?? _ignores;
  _result = result ?? _result;
  _progress = progress ?? _progress;
  _status = status ?? _status;
  _error = exception ?? _error;
  _message = message ?? _message;
  this.feedback = feedback ?? this.feedback;
  this.snapshot = snapshot ?? this.snapshot;
  return this;
}