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 InputPageBlockDetails? fromJson(Map<String, dynamic>? json) {
if (json == null) {
return null;
}
return InputPageBlockDetails(
header: RichText.fromJson(json['header'] as Map<String, dynamic>?)!,
blocks: List<InputPageBlock>.from(((json['blocks'] as List<dynamic>?) ??
<dynamic>[])
.map((item) => InputPageBlock.fromJson(item as Map<String, dynamic>?))
.toList()),
isOpen: (json['is_open'] as bool?) ?? false,
);
}