isRefresh method

bool isRefresh(
  1. String uri,
  2. Map<String, String>? headers,
  3. Response res
)

Implementation

bool isRefresh(String uri, Map<String, String>? headers, http.Response res) {
  return (uri != refreshURI &&
      res.statusCode != 200 &&
      json.decode(res.body)["error"] == "ExpiredToken" &&
      headers != null &&
      headers["Authorization"] != null);
}