toJson method

Map toJson()

Creates a json from the object

Implementation

Map toJson() {
  return {
    'type': type,
    'media': media,
    'thumb': thumb,
    'caption': caption,
    'parse_mode': parseMode,
    'caption_entities': captionEntities,
    'duration': duration,
    'performer': performer,
    'title': title,
  }..removeWhere((_, v) => v == null);
}