isAccessTokenExpired method

  1. @override
bool isAccessTokenExpired(
  1. DioException error
)
override

Calls to determine if the request failed because the access token expired or not. If so, the refresh token process will be started.

Implementation

@override
bool isAccessTokenExpired(DioException error) {
  return error.response?.statusCode == 401;
}