Cache.fromJson constructor

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

Creates a Cache instance from a JSON map.

Implementation

factory Cache.fromJson(Map<String, dynamic> json) {
  return Cache(
    render: json['render'].toString(),
    contentType: json['contentType'] != null
        ? ContentType.parse(json['contentType'])
        : null,
    createdAt:
        json['createdAt'] != null ? DateTime.parse(json['createdAt']) : null,
  );
}