fromMap static method

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

Gets a possible URLProtectionSpaceHttpAuthCredentials instance from a Map value.

Implementation

static URLProtectionSpaceHttpAuthCredentials? fromMap(
    Map<String, dynamic>? map) {
  if (map == null) {
    return null;
  }
  final instance = URLProtectionSpaceHttpAuthCredentials(
    credentials: map['credentials'] != null
        ? List<URLCredential>.from(map['credentials']
            .map((e) => URLCredential.fromMap(e?.cast<String, dynamic>())!))
        : null,
    protectionSpace: URLProtectionSpace.fromMap(
        map['protectionSpace']?.cast<String, dynamic>()),
  );
  return instance;
}