withBackups method

Response<T> withBackups(
  1. List<T>? value, {
  2. dynamic feedback,
  3. String? message,
  4. Status? status,
})

Attaches a list of backup values to the response.

value: List of backup values. feedback: Feedback data. message: Additional message. status: Status of the response. Returns the modified Response object with updated list of backup data.

Implementation

Response<T> withBackups(
  List<T>? value, {
  dynamic feedback,
  String? message,
  Status? status,
}) {
  this.feedback = feedback;
  _backups = _backups.attach(value);
  _result = [];
  _status = status;
  _message = message;
  _successful = status.isSuccessful;
  _loading = false;
  return this;
}