toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  return {
    'type': type.name,
    if (bytes != null) 'bytes': bytes,
    if (url != null) 'url': url,
    if (filePath != null) 'filePath': filePath,
    if (mimeType != null) 'mimeType': mimeType,
    if (name != null) 'name': name,
  };
}