withSnapshot method
Sets the snapshot data and associated properties with the response.
snapshot
: Snapshot data.
message
: Additional message.
status
: Status of the response.
Returns the modified Response object with updated snapshot data.
Implementation
Response<T> withSnapshot(dynamic snapshot,
{String? message, Status? status}) {
this.snapshot = snapshot;
_status = status;
_successful = status.isSuccessful;
_message = message;
_complete = true;
_loading = false;
return this;
}