shouldRefreshToken method

  1. @override
bool shouldRefreshToken(
  1. Response response
)
override

Determines if the token should be refreshed based on the given Response.

Returns true if the response status code is in refreshCodes, false otherwise.

Implementation

@override
bool shouldRefreshToken(Response response) {
  return refreshCodes.contains(response.statusCode);
}