fromMap static method
Gets a possible AjaxRequest instance from a Map value.
Implementation
static AjaxRequest? fromMap(Map<String, dynamic>? map) {
if (map == null) {
return null;
}
final instance = AjaxRequest(
data: map['data'],
event: AjaxRequestEvent.fromMap(map['event']?.cast<String, dynamic>()),
headers:
AjaxRequestHeaders.fromMap(map['headers']?.cast<String, dynamic>()),
isAsync: map['isAsync'],
method: map['method'],
password: map['password'],
readyState: AjaxRequestReadyState.fromNativeValue(map['readyState']),
response: map['response'],
responseHeaders: map['responseHeaders']?.cast<String, dynamic>(),
responseText: map['responseText'],
responseType: map['responseType'],
responseURL:
map['responseURL'] != null ? WebUri(map['responseURL']) : null,
responseXML: map['responseXML'],
status: map['status'],
statusText: map['statusText'],
url: map['url'] != null ? WebUri(map['url']) : null,
user: map['user'],
withCredentials: map['withCredentials'],
);
instance.action = AjaxRequestAction.fromNativeValue(map['action']);
return instance;
}