RichText.cashtag constructor

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

A cashtag.

Implementation

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

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

  /// The cashtag
  @JsonKey(name: 'cashtag') required String cashtag,
}) = RichTextCashtag;