fromMap static method
Gets a possible URLResponse instance from a Map value.
Implementation
static URLResponse? fromMap(Map<String, dynamic>? map) {
if (map == null) {
return null;
}
final instance = URLResponse(
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 ? WebUri(map['url']) : null,
);
return instance;
}