CacheEntry.fromJson constructor

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

Implementation

factory CacheEntry.fromJson(Map<String, dynamic> json) {
  return CacheEntry(
    key: json['key'] as String,
    localPath: json['localPath'] as String,
    size: json['size'] as int,
    cachedAt: DateTime.parse(json['cachedAt'] as String),
    lastAccessedAt: DateTime.parse(json['lastAccessedAt'] as String),
  );
}