fromMap static method
- Map<
String, dynamic> ? map, { - EnumMethod? enumMethod,
override
Gets a possible HttpAuthenticationChallenge instance from a Map value.
Implementation
static HttpAuthenticationChallenge? fromMap(
Map<String, dynamic>? map, {
EnumMethod? enumMethod,
}) {
if (map == null) {
return null;
}
final instance = HttpAuthenticationChallenge(
protectionSpace: URLProtectionSpace.fromMap(
map['protectionSpace']?.cast<String, dynamic>(),
enumMethod: enumMethod,
)!,
error: map['error'],
failureResponse: URLResponse.fromMap(
map['failureResponse']?.cast<String, dynamic>(),
enumMethod: enumMethod,
),
iosError: map['error'],
iosFailureResponse: IOSURLResponse.fromMap(
map['failureResponse']?.cast<String, dynamic>(),
enumMethod: enumMethod,
),
previousFailureCount: map['previousFailureCount'],
proposedCredential: URLCredential.fromMap(
map['proposedCredential']?.cast<String, dynamic>(),
enumMethod: enumMethod,
),
);
return instance;
}