URLProtectionSpace constructor

URLProtectionSpace({
  1. URLProtectionSpaceAuthenticationMethod? authenticationMethod,
  2. List<X509Certificate>? distinguishedNames,
  3. required String host,
  4. @Deprecated('Use authenticationMethod instead') IOSNSURLProtectionSpaceAuthenticationMethod? iosAuthenticationMethod,
  5. @Deprecated('Use distinguishedNames instead') List<X509Certificate>? iosDistinguishedNames,
  6. @Deprecated('Use proxyType instead') IOSNSURLProtectionSpaceProxyType? iosProxyType,
  7. @Deprecated('Use receivesCredentialSecurely instead') bool? iosReceivesCredentialSecurely,
  8. int? port,
  9. String? protocol,
  10. URLProtectionSpaceProxyType? proxyType,
  11. String? realm,
  12. bool? receivesCredentialSecurely,
  13. SslCertificate? sslCertificate,
  14. SslError? sslError,
})

Implementation

URLProtectionSpace(
    {this.authenticationMethod,
    this.distinguishedNames,
    required this.host,
    @Deprecated('Use authenticationMethod instead')
    this.iosAuthenticationMethod,
    @Deprecated('Use distinguishedNames instead') this.iosDistinguishedNames,
    @Deprecated('Use proxyType instead') this.iosProxyType,
    @Deprecated('Use receivesCredentialSecurely instead')
    this.iosReceivesCredentialSecurely,
    this.port,
    this.protocol,
    this.proxyType,
    this.realm,
    this.receivesCredentialSecurely,
    this.sslCertificate,
    this.sslError}) {
  authenticationMethod = authenticationMethod ??
      URLProtectionSpaceAuthenticationMethod.fromNativeValue(
          iosAuthenticationMethod?.toNativeValue());
  distinguishedNames = distinguishedNames ?? iosDistinguishedNames;
  proxyType = proxyType ??
      URLProtectionSpaceProxyType.fromNativeValue(
          iosProxyType?.toNativeValue());
  receivesCredentialSecurely =
      receivesCredentialSecurely ?? iosReceivesCredentialSecurely;
}