fromHttpResponse static method

AuthRevokeResponse fromHttpResponse(
  1. int statusCode,
  2. String responseBody
)

Implementation

static AuthRevokeResponse fromHttpResponse(
  int statusCode,
  String responseBody,
) {
  if (statusCode == 200) {
    return AuthRevokeResponse();
  } else {
    final body = jsonDecode(responseBody);

    return AuthRevokeResponse(
        message: body['message'], status: body['status']);
  }
}