removeBasicAuth method

void removeBasicAuth(
  1. String name
)

Removes the basic authentication credentials associated with the given name.

If no BasicAuthInterceptor is registered or no credentials exist for the given name, this method has no effect.

Implementation

void removeBasicAuth(String name) {
  if (this.dio.interceptors.any((i) => i is BasicAuthInterceptor)) {
    (this.dio.interceptors.firstWhere((i) => i is BasicAuthInterceptor)
            as BasicAuthInterceptor)
        .authInfo
        .remove(name);
  }
}