RichText.mention constructor
const
RichText.mention({
- @JsonKey.new(name: 'type') @Default.new(RichTextType.mention) RichTextType type,
- @JsonKey.new(name: 'text') @RichTextConverter() required RichText text,
- @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;