fromMap static method

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

Gets a possible IOSURLResponse instance from a Map value.

Implementation

static IOSURLResponse? fromMap(Map<String, dynamic>? map) {
  if (map == null) {
    return null;
  }
  final instance = IOSURLResponse(
    expectedContentLength: map['expectedContentLength'],
    headers: map['headers']?.cast<String, String>(),
    mimeType: map['mimeType'],
    statusCode: map['statusCode'],
    suggestedFilename: map['suggestedFilename'],
    textEncodingName: map['textEncodingName'],
    url: map['url'] != null ? Uri.tryParse(map['url']) : null,
  );
  return instance;
}