Document.fromJson constructor

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

Parse from a json

Implementation

factory Document.fromJson(Map<String, dynamic> json) => Document(
      fileName: json['file_name'],
      mimeType: json['mime_type'],
      minithumbnail: json['minithumbnail'] == null
          ? null
          : Minithumbnail.fromJson(json['minithumbnail']),
      thumbnail: json['thumbnail'] == null
          ? null
          : Thumbnail.fromJson(json['thumbnail']),
      document: File.fromJson(json['document']),
    );