setBasicAuth method

void setBasicAuth(
  1. String name,
  2. String username,
  3. String password
)

Implementation

void setBasicAuth(String name, String username, String password) {
  (this.dio.interceptors.firstWhere(
            (element) => element is BasicAuthInterceptor,
            orElse: null,
          ) as BasicAuthInterceptor)
      .authInfo[name] = BasicAuthInfo(username, password);
}