toJson method

Map<String, dynamic> toJson()

Converts a Audio to a Map for JSON encoding.

Implementation

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