fromJson static method
Inherited by: TextEntityTypeBankCardNumber TextEntityTypeBlockQuote TextEntityTypeBold TextEntityTypeBotCommand TextEntityTypeCashtag TextEntityTypeCode TextEntityTypeCustomEmoji TextEntityTypeDateTime TextEntityTypeEmailAddress TextEntityTypeExpandableBlockQuote TextEntityTypeHashtag TextEntityTypeItalic TextEntityTypeMediaTimestamp TextEntityTypeMention TextEntityTypeMentionName TextEntityTypePhoneNumber TextEntityTypePre TextEntityTypePreCode TextEntityTypeSpoiler TextEntityTypeStrikethrough TextEntityTypeTextUrl TextEntityTypeUnderline TextEntityTypeUrl
Implementation
static TextEntityType? fromJson(Map<String, dynamic>? json) {
if (json == null) {
return null;
}
switch (json['@type']) {
case TextEntityTypeBankCardNumber.constructor:
return TextEntityTypeBankCardNumber.fromJson(json);
case TextEntityTypeBlockQuote.constructor:
return TextEntityTypeBlockQuote.fromJson(json);
case TextEntityTypeBold.constructor:
return TextEntityTypeBold.fromJson(json);
case TextEntityTypeBotCommand.constructor:
return TextEntityTypeBotCommand.fromJson(json);
case TextEntityTypeCashtag.constructor:
return TextEntityTypeCashtag.fromJson(json);
case TextEntityTypeCode.constructor:
return TextEntityTypeCode.fromJson(json);
case TextEntityTypeCustomEmoji.constructor:
return TextEntityTypeCustomEmoji.fromJson(json);
case TextEntityTypeDateTime.constructor:
return TextEntityTypeDateTime.fromJson(json);
case TextEntityTypeEmailAddress.constructor:
return TextEntityTypeEmailAddress.fromJson(json);
case TextEntityTypeExpandableBlockQuote.constructor:
return TextEntityTypeExpandableBlockQuote.fromJson(json);
case TextEntityTypeHashtag.constructor:
return TextEntityTypeHashtag.fromJson(json);
case TextEntityTypeItalic.constructor:
return TextEntityTypeItalic.fromJson(json);
case TextEntityTypeMediaTimestamp.constructor:
return TextEntityTypeMediaTimestamp.fromJson(json);
case TextEntityTypeMention.constructor:
return TextEntityTypeMention.fromJson(json);
case TextEntityTypeMentionName.constructor:
return TextEntityTypeMentionName.fromJson(json);
case TextEntityTypePhoneNumber.constructor:
return TextEntityTypePhoneNumber.fromJson(json);
case TextEntityTypePre.constructor:
return TextEntityTypePre.fromJson(json);
case TextEntityTypePreCode.constructor:
return TextEntityTypePreCode.fromJson(json);
case TextEntityTypeSpoiler.constructor:
return TextEntityTypeSpoiler.fromJson(json);
case TextEntityTypeStrikethrough.constructor:
return TextEntityTypeStrikethrough.fromJson(json);
case TextEntityTypeTextUrl.constructor:
return TextEntityTypeTextUrl.fromJson(json);
case TextEntityTypeUnderline.constructor:
return TextEntityTypeUnderline.fromJson(json);
case TextEntityTypeUrl.constructor:
return TextEntityTypeUrl.fromJson(json);
default:
return null;
}
}