withBackup method
Sets a backup value and associated properties with the response.
value
: The backup value.
feedback
: Feedback data.
message
: Additional message.
status
: Status of the response.
Returns the modified Response object with updated backup data.
Implementation
Response<T> withBackup(
T? value, {
dynamic feedback,
String? message,
Status? status,
}) {
this.feedback = feedback;
_backups = _backups.set(value);
_status = status;
_message = message;
_successful = status.isSuccessful;
_data = null;
_loading = false;
return this;
}