setBasicAuth method
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);
}