Response.fromJson constructor Null safety

Response.fromJson(
  1. Map<String, dynamic> json
)

Implementation

Response.fromJson(Map<String, dynamic> json)
    : eTag = json['etag'],
      mustRevalidate = json['must-revalidate'],
      noContent = json['no-content'],
      modified = json['modified'],
      source = EnumToString.fromString(ResponseSourceType.values,
          json['source'].toUpperCase().replaceAll("-", "_"))!,
      notModified = json['not-modified'],
      expires = json['expires'],
      size = json['size'],
      error = json['error'] != null ? Error.fromJson(json['error']) : null;