toJson method
Implementation
@override
Map<String, dynamic> toJson() => <String, dynamic>{
'animation': animation?.toJson(),
'caption': caption?.toJson(),
'need_autoplay': needAutoplay,
'has_spoiler': hasSpoiler,
'@type': constructor,
};