withAvailable method

Response<T> withAvailable(
  1. bool available, {
  2. T? data,
  3. Status? status,
  4. String? message,
})

Sets the response as available and optionally provides data, status, and message.

available: Indicates if the response is available. data: The data associated with the response. status: Status of the response. message: Additional message. Returns the modified Response object with updated availability status and data.

Implementation

Response<T> withAvailable(
  bool available, {
  T? data,
  Status? status,
  String? message,
}) {
  _available = available;
  _status = status;
  _data = data;
  _message = message;
  _loading = false;
  return this;
}