fromMap static method

HttpAuthenticationChallenge? fromMap(
  1. Map<String, dynamic>? map
)
override

Gets a possible HttpAuthenticationChallenge instance from a Map value.

Implementation

static HttpAuthenticationChallenge? fromMap(Map<String, dynamic>? map) {
  if (map == null) {
    return null;
  }
  final instance = HttpAuthenticationChallenge(
    protectionSpace: URLProtectionSpace.fromMap(
        map['protectionSpace']?.cast<String, dynamic>())!,
    error: map['error'],
    failureResponse:
        URLResponse.fromMap(map['failureResponse']?.cast<String, dynamic>()),
    iosError: map['error'],
    iosFailureResponse: IOSURLResponse.fromMap(
        map['failureResponse']?.cast<String, dynamic>()),
    previousFailureCount: map['previousFailureCount'],
    proposedCredential: URLCredential.fromMap(
        map['proposedCredential']?.cast<String, dynamic>()),
  );
  return instance;
}