maybeMap<TResult extends Object?> method
TResult
maybeMap<TResult extends Object?>({
- TResult bankCardNumber()?,
- TResult blockQuote(
- TextEntityTypeBlockQuote value
- TResult bold(
- TextEntityTypeBold value
- TResult botCommand(
- TextEntityTypeBotCommand value
- TResult cashtag(
- TextEntityTypeCashtag value
- TResult code(
- TextEntityTypeCode value
- TResult customEmoji()?,
- TResult dateTime(
- TextEntityTypeDateTime value
- TResult emailAddress()?,
- TResult expandableBlockQuote()?,
- TResult hashtag(
- TextEntityTypeHashtag value
- TResult italic(
- TextEntityTypeItalic value
- TResult mediaTimestamp()?,
- TResult mention(
- TextEntityTypeMention value
- TResult mentionName()?,
- TResult phoneNumber()?,
- TResult pre(
- TextEntityTypePre value
- TResult preCode(
- TextEntityTypePreCode value
- TResult spoiler(
- TextEntityTypeSpoiler value
- TResult strikethrough()?,
- TResult textUrl(
- TextEntityTypeTextUrl value
- TResult underline(
- TextEntityTypeUnderline value
- TResult url(
- TextEntityTypeUrl value
- required TResult orElse(),
Implementation
TResult maybeMap<TResult extends Object?>({
TResult Function(TextEntityTypeBankCardNumber value)? bankCardNumber,
TResult Function(TextEntityTypeBlockQuote value)? blockQuote,
TResult Function(TextEntityTypeBold value)? bold,
TResult Function(TextEntityTypeBotCommand value)? botCommand,
TResult Function(TextEntityTypeCashtag value)? cashtag,
TResult Function(TextEntityTypeCode value)? code,
TResult Function(TextEntityTypeCustomEmoji value)? customEmoji,
TResult Function(TextEntityTypeDateTime value)? dateTime,
TResult Function(TextEntityTypeEmailAddress value)? emailAddress,
TResult Function(TextEntityTypeExpandableBlockQuote value)?
expandableBlockQuote,
TResult Function(TextEntityTypeHashtag value)? hashtag,
TResult Function(TextEntityTypeItalic value)? italic,
TResult Function(TextEntityTypeMediaTimestamp value)? mediaTimestamp,
TResult Function(TextEntityTypeMention value)? mention,
TResult Function(TextEntityTypeMentionName value)? mentionName,
TResult Function(TextEntityTypePhoneNumber value)? phoneNumber,
TResult Function(TextEntityTypePre value)? pre,
TResult Function(TextEntityTypePreCode value)? preCode,
TResult Function(TextEntityTypeSpoiler value)? spoiler,
TResult Function(TextEntityTypeStrikethrough value)? strikethrough,
TResult Function(TextEntityTypeTextUrl value)? textUrl,
TResult Function(TextEntityTypeUnderline value)? underline,
TResult Function(TextEntityTypeUrl value)? url,
required TResult Function() orElse,
}) {
switch (getConstructor()) {
case TextEntityTypeBankCardNumber.constructor:
if (bankCardNumber != null) {
return bankCardNumber.call(this as TextEntityTypeBankCardNumber);
}
break;
case TextEntityTypeBlockQuote.constructor:
if (blockQuote != null) {
return blockQuote.call(this as TextEntityTypeBlockQuote);
}
break;
case TextEntityTypeBold.constructor:
if (bold != null) {
return bold.call(this as TextEntityTypeBold);
}
break;
case TextEntityTypeBotCommand.constructor:
if (botCommand != null) {
return botCommand.call(this as TextEntityTypeBotCommand);
}
break;
case TextEntityTypeCashtag.constructor:
if (cashtag != null) {
return cashtag.call(this as TextEntityTypeCashtag);
}
break;
case TextEntityTypeCode.constructor:
if (code != null) {
return code.call(this as TextEntityTypeCode);
}
break;
case TextEntityTypeCustomEmoji.constructor:
if (customEmoji != null) {
return customEmoji.call(this as TextEntityTypeCustomEmoji);
}
break;
case TextEntityTypeDateTime.constructor:
if (dateTime != null) {
return dateTime.call(this as TextEntityTypeDateTime);
}
break;
case TextEntityTypeEmailAddress.constructor:
if (emailAddress != null) {
return emailAddress.call(this as TextEntityTypeEmailAddress);
}
break;
case TextEntityTypeExpandableBlockQuote.constructor:
if (expandableBlockQuote != null) {
return expandableBlockQuote.call(
this as TextEntityTypeExpandableBlockQuote,
);
}
break;
case TextEntityTypeHashtag.constructor:
if (hashtag != null) {
return hashtag.call(this as TextEntityTypeHashtag);
}
break;
case TextEntityTypeItalic.constructor:
if (italic != null) {
return italic.call(this as TextEntityTypeItalic);
}
break;
case TextEntityTypeMediaTimestamp.constructor:
if (mediaTimestamp != null) {
return mediaTimestamp.call(this as TextEntityTypeMediaTimestamp);
}
break;
case TextEntityTypeMention.constructor:
if (mention != null) {
return mention.call(this as TextEntityTypeMention);
}
break;
case TextEntityTypeMentionName.constructor:
if (mentionName != null) {
return mentionName.call(this as TextEntityTypeMentionName);
}
break;
case TextEntityTypePhoneNumber.constructor:
if (phoneNumber != null) {
return phoneNumber.call(this as TextEntityTypePhoneNumber);
}
break;
case TextEntityTypePre.constructor:
if (pre != null) {
return pre.call(this as TextEntityTypePre);
}
break;
case TextEntityTypePreCode.constructor:
if (preCode != null) {
return preCode.call(this as TextEntityTypePreCode);
}
break;
case TextEntityTypeSpoiler.constructor:
if (spoiler != null) {
return spoiler.call(this as TextEntityTypeSpoiler);
}
break;
case TextEntityTypeStrikethrough.constructor:
if (strikethrough != null) {
return strikethrough.call(this as TextEntityTypeStrikethrough);
}
break;
case TextEntityTypeTextUrl.constructor:
if (textUrl != null) {
return textUrl.call(this as TextEntityTypeTextUrl);
}
break;
case TextEntityTypeUnderline.constructor:
if (underline != null) {
return underline.call(this as TextEntityTypeUnderline);
}
break;
case TextEntityTypeUrl.constructor:
if (url != null) {
return url.call(this as TextEntityTypeUrl);
}
break;
}
return orElse.call();
}