RichText.hashtag constructor

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

A hashtag.

Implementation

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

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

  /// The hashtag
  @JsonKey(name: 'hashtag') required String hashtag,
}) = RichTextHashtag;