setBearerAuth method

void setBearerAuth(
  1. String name,
  2. String token
)

Implementation

void setBearerAuth(String name, String token) {
  if (dio.interceptors.any((i) => i is BearerAuthInterceptor)) {
    (dio.interceptors.firstWhere((i) => i is BearerAuthInterceptor)
                as BearerAuthInterceptor)
            .tokens[name] =
        token;
  }
}