ProjectCache.fromJson constructor

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

Implementation

factory ProjectCache.fromJson(Map<String, dynamic> json) {
  return ProjectCache(
    type: (json['type'] as String).toCacheType(),
    location: json['location'] as String?,
    modes: (json['modes'] as List?)
        ?.whereNotNull()
        .map((e) => (e as String).toCacheMode())
        .toList(),
  );
}