isInvalidTokenError method Null safety

bool isInvalidTokenError()

Implementation

bool isInvalidTokenError() {
  if (this is KakaoAuthException &&
      (this as KakaoAuthException).error == AuthErrorCause.invalidGrant) {
    return true;
  } else if (this is KakaoApiException &&
      (this as KakaoApiException).code == ApiErrorCause.invalidToken) {
    return true;
  }
  return false;
}