fromJson static method

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

Implementation

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

  return InputMessageVideo(
    video: InputVideo.fromJson(json['video'] as Map<String, dynamic>?)!,
    caption: FormattedText.fromJson(json['caption'] as Map<String, dynamic>?),
    showCaptionAboveMedia:
        (json['show_caption_above_media'] as bool?) ?? false,
    selfDestructType: MessageSelfDestructType.fromJson(
        json['self_destruct_type'] as Map<String, dynamic>?),
    hasSpoiler: (json['has_spoiler'] as bool?) ?? false,
  );
}