RichText.mention constructor

const RichText.mention({
  1. @JsonKey.new(name: 'type') @Default.new(RichTextType.mention) RichTextType type,
  2. @JsonKey.new(name: 'text') @RichTextConverter() required RichText text,
  3. @JsonKey.new(name: 'username') required String username,
})

A mention by a username.

Implementation

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

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

  /// The username
  @JsonKey(name: 'username') required String username,
}) = RichTextMention;