RichText.textMention constructor

const RichText.textMention({
  1. @JsonKey.new(name: 'type') @Default.new(RichTextType.textMention) RichTextType type,
  2. @JsonKey.new(name: 'text') @RichTextConverter() required RichText text,
  3. @JsonKey.new(name: 'user') required User user,
})

A mention of a Telegram user by their identifier.

Implementation

const factory RichText.textMention({
  /// Type of the rich text, always "text_mention"
  @JsonKey(name: 'type') @Default(RichTextType.textMention) RichTextType type,

  /// The text
  @JsonKey(name: 'text') @RichTextConverter() required RichText text,

  /// The mentioned user
  @JsonKey(name: 'user') required User user,
}) = RichTextTextMention;