fromMap static method
Implementation
static URLRequest? fromMap(Map<String, dynamic>? map) {
if (map == null) {
return null;
}
return URLRequest(
url: map["url"] != null ? Uri.tryParse(map["url"]) : null,
headers: map["headers"]?.cast<String, String>(),
method: map["method"],
body: map["body"],
iosAllowsCellularAccess: map["iosAllowsCellularAccess"],
iosAllowsConstrainedNetworkAccess:
map["iosAllowsConstrainedNetworkAccess"],
iosAllowsExpensiveNetworkAccess: map["iosAllowsExpensiveNetworkAccess"],
iosCachePolicy: IOSURLRequestCachePolicy.fromValue(map["iosCachePolicy"]),
iosHttpShouldHandleCookies: map["iosHttpShouldHandleCookies"],
iosHttpShouldUsePipelining: map["iosHttpShouldUsePipelining"],
iosNetworkServiceType: IOSURLRequestNetworkServiceType.fromValue(
map["iosNetworkServiceType"]),
iosTimeoutInterval: map["iosTimeoutInterval"],
iosMainDocumentURL: map["iosMainDocumentURL"] != null
? Uri.tryParse(map["iosMainDocumentURL"])
: null,
);
}