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,
    'width': width,
    'height': height,
    'duration': duration,
  }..removeWhere((_, v) => v == null);
}