fromJson static method
Inherited by: RichTextAnchor RichTextAnchorLink RichTextBankCardNumber RichTextBold RichTextBotCommand RichTextCashtag RichTextCustomEmoji RichTextDateTime RichTextDiff RichTextEmailAddress RichTextFixed RichTextHashtag RichTextIcon RichTextItalic RichTextMarked RichTextMathematicalExpression RichTextMention RichTextMentionName RichTextPhoneNumber RichTextPlain RichTextReference RichTextReferenceLink RichTextSpoiler RichTextStrikethrough RichTextSubscript RichTextSuperscript RichTextUnderline RichTextUrl RichTexts
Implementation
static RichTextDateTime? fromJson(Map<String, dynamic>? json) {
if (json == null) {
return null;
}
return RichTextDateTime(
text: RichText.fromJson(tdMapFromJson(json['text'])),
unixTime: (json['unix_time'] as int?) ?? 0,
formattingType: DateTimeFormattingType.fromJson(
tdMapFromJson(json['formatting_type']),
),
);
}