fromMap static method
Gets a possible URLProtectionSpace instance from a Map value.
Implementation
static URLProtectionSpace? fromMap(Map<String, dynamic>? map) {
if (map == null) {
return null;
}
final instance = URLProtectionSpace(
authenticationMethod:
URLProtectionSpaceAuthenticationMethod.fromNativeValue(
map['authenticationMethod']),
distinguishedNames:
_distinguishedNamesDeserializer(map['distinguishedNames']),
host: map['host'],
iosAuthenticationMethod:
IOSNSURLProtectionSpaceAuthenticationMethod.fromNativeValue(
map['authenticationMethod']),
iosDistinguishedNames:
_distinguishedNamesDeserializer(map['distinguishedNames']),
iosProxyType:
IOSNSURLProtectionSpaceProxyType.fromNativeValue(map['proxyType']),
iosReceivesCredentialSecurely: map['receivesCredentialSecurely'],
port: map['port'],
protocol: map['protocol'],
proxyType: URLProtectionSpaceProxyType.fromNativeValue(map['proxyType']),
realm: map['realm'],
receivesCredentialSecurely: map['receivesCredentialSecurely'],
sslCertificate: SslCertificate.fromMap(
map['sslCertificate']?.cast<String, dynamic>()),
sslError: SslError.fromMap(map['sslError']?.cast<String, dynamic>()),
);
return instance;
}