removeHttpAuthCredential method
Future<void>
removeHttpAuthCredential({
- required URLProtectionSpace protectionSpace,
- required URLCredential credential,
Removes an HTTP auth credential
for that protectionSpace
.
Officially Supported Platforms/Implementations:
- Android native WebView
- iOS (Official API - URLCredentialStorage.remove)
- MacOS (Official API - URLCredentialStorage.remove)
Implementation
@override
Future<void> removeHttpAuthCredential(
{required URLProtectionSpace protectionSpace,
required URLCredential credential}) 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);
args.putIfAbsent("username", () => credential.username);
args.putIfAbsent("password", () => credential.password);
await channel?.invokeMethod('removeHttpAuthCredential', args);
}