toJson method

Map<String, dynamic> toJson()

Creates a json from the object

Implementation

Map<String, dynamic> toJson() {
  return {
    'type': type,
    'media': media,
    'caption': caption,
    'parse_mode': parseMode,
  }..removeWhere((_, v) => v == null);
}