fromJson static method
Inherited by: InputPageBlockAnchor InputPageBlockAnimation InputPageBlockAudio InputPageBlockBlockQuote InputPageBlockCollage InputPageBlockDetails InputPageBlockDivider InputPageBlockFooter InputPageBlockList InputPageBlockMap InputPageBlockMathematicalExpression InputPageBlockParagraph InputPageBlockPhoto InputPageBlockPreformatted InputPageBlockPullQuote InputPageBlockSectionHeading InputPageBlockSlideshow InputPageBlockTable InputPageBlockThinking InputPageBlockVideo InputPageBlockVoiceNote
Implementation
static InputPageBlockDetails? fromJson(Map<String, dynamic>? json) {
if (json == null) {
return null;
}
return InputPageBlockDetails(
header: RichText.fromJson(tdMapFromJson(json['header'])),
blocks: List<InputPageBlock>.from(
tdListFromJson(json['blocks'])
.map((item) => InputPageBlock.fromJson(tdMapFromJson(item)))
.whereType<InputPageBlock>(),
),
isOpen: (json['is_open'] as bool?) ?? false,
);
}