fromMap method Null safety

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

Implementation

static URLAuthenticationChallenge? fromMap(Map<String, dynamic>? map) {
  if (map == null) {
    return null;
  }
  return URLAuthenticationChallenge(
    protectionSpace: URLProtectionSpace.fromMap(
        map["protectionSpace"].cast<String, dynamic>())!,
  );
}