toJson method
Implementation
Map<String, dynamic> toJson() {
final ret = <String, dynamic>{
'file': fileInfo, // Check
'url': fileInfo.fileUrl,
'file_name': fileInfo.fileName,
'file_size': fileInfo.fileSize,
'file_type': fileInfo.mimeType,
'thumbnails': thumbnailSizes,
'scheduled_at': scheduledAt,
'custom_type': customType,
'data': data,
'mention_type': mentionType.toString().split('.').last,
'mentionedUserIds': mentionedUserIds,
'sorted_metaarray': metaArrays,
'name': appleCriticalAlertOptions?.name,
'volume': appleCriticalAlertOptions?.volume,
'push_option': pushNotificationDeliveryOption.toString().split('.').last,
};
ret.removeWhere((key, value) => value == null);
return ret;
}