maybeMap<TResult extends Object?> method
TResult
maybeMap<TResult extends Object?>({
- TResult anchor(
- InputPageBlockAnchor value
- TResult animation(
- InputPageBlockAnimation value
- TResult audio(
- InputPageBlockAudio value
- TResult blockQuote(
- InputPageBlockBlockQuote value
- TResult collage(
- InputPageBlockCollage value
- TResult details(
- InputPageBlockDetails value
- TResult divider(
- InputPageBlockDivider value
- TResult list(
- InputPageBlockList value
- TResult map(
- InputPageBlockMap value
- TResult mathematicalExpression()?,
- TResult paragraph(
- InputPageBlockParagraph value
- TResult photo(
- InputPageBlockPhoto value
- TResult preformatted()?,
- TResult pullQuote(
- InputPageBlockPullQuote value
- TResult sectionHeading()?,
- TResult slideshow(
- InputPageBlockSlideshow value
- TResult table(
- InputPageBlockTable value
- TResult thinking(
- InputPageBlockThinking value
- TResult video(
- InputPageBlockVideo value
- TResult voiceNote(
- InputPageBlockVoiceNote value
- required TResult orElse(),
Implementation
TResult maybeMap<TResult extends Object?>({
TResult Function(InputPageBlockAnchor value)? anchor,
TResult Function(InputPageBlockAnimation value)? animation,
TResult Function(InputPageBlockAudio value)? audio,
TResult Function(InputPageBlockBlockQuote value)? blockQuote,
TResult Function(InputPageBlockCollage value)? collage,
TResult Function(InputPageBlockDetails value)? details,
TResult Function(InputPageBlockDivider value)? divider,
TResult Function(InputPageBlockFooter value)? footer,
TResult Function(InputPageBlockList value)? list,
TResult Function(InputPageBlockMap value)? map,
TResult Function(InputPageBlockMathematicalExpression value)?
mathematicalExpression,
TResult Function(InputPageBlockParagraph value)? paragraph,
TResult Function(InputPageBlockPhoto value)? photo,
TResult Function(InputPageBlockPreformatted value)? preformatted,
TResult Function(InputPageBlockPullQuote value)? pullQuote,
TResult Function(InputPageBlockSectionHeading value)? sectionHeading,
TResult Function(InputPageBlockSlideshow value)? slideshow,
TResult Function(InputPageBlockTable value)? table,
TResult Function(InputPageBlockThinking value)? thinking,
TResult Function(InputPageBlockVideo value)? video,
TResult Function(InputPageBlockVoiceNote value)? voiceNote,
required TResult Function() orElse,
}) {
switch (getConstructor()) {
case InputPageBlockAnchor.constructor:
if (anchor != null) {
return anchor.call(this as InputPageBlockAnchor);
}
break;
case InputPageBlockAnimation.constructor:
if (animation != null) {
return animation.call(this as InputPageBlockAnimation);
}
break;
case InputPageBlockAudio.constructor:
if (audio != null) {
return audio.call(this as InputPageBlockAudio);
}
break;
case InputPageBlockBlockQuote.constructor:
if (blockQuote != null) {
return blockQuote.call(this as InputPageBlockBlockQuote);
}
break;
case InputPageBlockCollage.constructor:
if (collage != null) {
return collage.call(this as InputPageBlockCollage);
}
break;
case InputPageBlockDetails.constructor:
if (details != null) {
return details.call(this as InputPageBlockDetails);
}
break;
case InputPageBlockDivider.constructor:
if (divider != null) {
return divider.call(this as InputPageBlockDivider);
}
break;
case InputPageBlockFooter.constructor:
if (footer != null) {
return footer.call(this as InputPageBlockFooter);
}
break;
case InputPageBlockList.constructor:
if (list != null) {
return list.call(this as InputPageBlockList);
}
break;
case InputPageBlockMap.constructor:
if (map != null) {
return map.call(this as InputPageBlockMap);
}
break;
case InputPageBlockMathematicalExpression.constructor:
if (mathematicalExpression != null) {
return mathematicalExpression.call(
this as InputPageBlockMathematicalExpression,
);
}
break;
case InputPageBlockParagraph.constructor:
if (paragraph != null) {
return paragraph.call(this as InputPageBlockParagraph);
}
break;
case InputPageBlockPhoto.constructor:
if (photo != null) {
return photo.call(this as InputPageBlockPhoto);
}
break;
case InputPageBlockPreformatted.constructor:
if (preformatted != null) {
return preformatted.call(this as InputPageBlockPreformatted);
}
break;
case InputPageBlockPullQuote.constructor:
if (pullQuote != null) {
return pullQuote.call(this as InputPageBlockPullQuote);
}
break;
case InputPageBlockSectionHeading.constructor:
if (sectionHeading != null) {
return sectionHeading.call(this as InputPageBlockSectionHeading);
}
break;
case InputPageBlockSlideshow.constructor:
if (slideshow != null) {
return slideshow.call(this as InputPageBlockSlideshow);
}
break;
case InputPageBlockTable.constructor:
if (table != null) {
return table.call(this as InputPageBlockTable);
}
break;
case InputPageBlockThinking.constructor:
if (thinking != null) {
return thinking.call(this as InputPageBlockThinking);
}
break;
case InputPageBlockVideo.constructor:
if (video != null) {
return video.call(this as InputPageBlockVideo);
}
break;
case InputPageBlockVoiceNote.constructor:
if (voiceNote != null) {
return voiceNote.call(this as InputPageBlockVoiceNote);
}
break;
}
return orElse.call();
}