fromJson static method

RichTextMention? fromJson(
  1. Map<String, dynamic>? json
)
override

Implementation

static RichTextMention? fromJson(Map<String, dynamic>? json) {
  if (json == null) {
    return null;
  }

  return RichTextMention(
    text: RichText.fromJson(tdMapFromJson(json['text'])),
    username: (json['username'] as String?) ?? '',
  );
}