toJson method

Map<String, dynamic> toJson()

Converts a Document to a Map for JSON encoding.

Implementation

Map<String, dynamic> toJson() {
  return {
    'file_id': fileId,
    'file_unique_id': fileUniqueId,
    'thumbnail': thumbnail?.toJson(),
    'file_name': fileName,
    'mime_type': mimeType,
    'file_size': fileSize,
  }..removeWhere(_nullFilter);
}