PersonalDocument.fromJson constructor

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

Parse from a json

Implementation

factory PersonalDocument.fromJson(Map<String, dynamic> json) =>
    PersonalDocument(
      files: List<DatedFile>.from((json['files'] ?? [])
          .map((item) => DatedFile.fromJson(item))
          .toList()),
      translation: List<DatedFile>.from((json['translation'] ?? [])
          .map((item) => DatedFile.fromJson(item))
          .toList()),
    );