removeHttpAuthCredentials method

Future<void> removeHttpAuthCredentials({
  1. required URLProtectionSpace protectionSpace,
})

Removes all the HTTP auth credentials saved for that protectionSpace.

Implementation

Future<void> removeHttpAuthCredentials(
    {required URLProtectionSpace protectionSpace}) async {
  Map<String, dynamic> args = <String, dynamic>{};
  args.putIfAbsent("host", () => protectionSpace.host);
  args.putIfAbsent("protocol", () => protectionSpace.protocol);
  args.putIfAbsent("realm", () => protectionSpace.realm);
  args.putIfAbsent("port", () => protectionSpace.port);
  await _channel.invokeMethod('removeHttpAuthCredentials', args);
}