CacheMetadata.fromJson constructor

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

Create from JSON

Implementation

factory CacheMetadata.fromJson(Map<String, dynamic> json) {
  return CacheMetadata(
    url: json['url'] as String,
    sizeInBytes: json['sizeInBytes'] as int,
    timestamp: DateTime.parse(json['timestamp'] as String),
    cacheKey: json['cacheKey'] as String,
  );
}