ResponseAPI constructor

ResponseAPI(
  1. int code,
  2. Map<String, dynamic> response, {
  3. bool? isError,
  4. dynamic isCacheError,
  5. dynamic error,
})

Constructor to initialize the API response.

  • code: HTTP status code.
  • response: The actual response data from the API.
  • isError: Optional flag to indicate if the response contains an error.
  • isCacheError: Optional flag to indicate if the error is due to cache issues.
  • error: Optional field to store error details.

Implementation

ResponseAPI(this.code, this.response, {this.isError, this.isCacheError, this.error});