fromJson static method

InputMessageAnimation? fromJson(
  1. Map<String, dynamic>? json
)
override

Implementation

static InputMessageAnimation? fromJson(Map<String, dynamic>? json) {
  if (json == null) {
    return null;
  }

  return InputMessageAnimation(
    animation: InputAnimation.fromJson(tdMapFromJson(json['animation'])),
    caption: FormattedText.fromJson(tdMapFromJson(json['caption'])),
    showCaptionAboveMedia:
        (json['show_caption_above_media'] as bool?) ?? false,
    hasSpoiler: (json['has_spoiler'] as bool?) ?? false,
  );
}