fromJson static method
Inherited by: InputPageBlockAnchor InputPageBlockAnimation InputPageBlockAudio InputPageBlockBlockQuote InputPageBlockButtonRow InputPageBlockCollage InputPageBlockDetails InputPageBlockDivider InputPageBlockDocument InputPageBlockExpandableBlockQuote InputPageBlockFooter InputPageBlockList InputPageBlockMap InputPageBlockMathematicalExpression InputPageBlockParagraph InputPageBlockPhoto InputPageBlockPreformatted InputPageBlockPullQuote InputPageBlockSectionHeading InputPageBlockSlideshow InputPageBlockTable InputPageBlockThinking InputPageBlockVideo InputPageBlockVoiceNote
Implementation
static InputPageBlockVideo? fromJson(Map<String, dynamic>? json) {
if (json == null) {
return null;
}
return InputPageBlockVideo(
video: InputVideo.fromJson(json['video'] as Map<String, dynamic>?)!,
caption:
PageBlockCaption.fromJson(json['caption'] as Map<String, dynamic>?),
hasSpoiler: (json['has_spoiler'] as bool?) ?? false,
);
}