fromMap static method

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

Gets a possible WebResourceResponse instance from a Map value.

Implementation

static WebResourceResponse? fromMap(Map<String, dynamic>? map) {
  if (map == null) {
    return null;
  }
  final instance = WebResourceResponse(
    data: map['data'],
    headers: map['headers']?.cast<String, String>(),
    reasonPhrase: map['reasonPhrase'],
    statusCode: map['statusCode'],
  );
  instance.contentEncoding = map['contentEncoding'];
  instance.contentType = map['contentType'];
  return instance;
}