toJson method
Creates a json from the object
Implementation
Map toJson() {
return {
'type': type,
'media': media,
'thumb': thumb,
'caption': caption,
'parse_mode': parseMode,
'caption_entities': captionEntities,
'width': width,
'height': height,
'duration': duration,
'supports_streaming': supportsStreaming,
}..removeWhere((_, v) => v == null);
}