RichText.anchorLink constructor

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

A link to an anchor.

Implementation

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

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

  /// The name of the anchor
  @JsonKey(name: 'anchor_name') required String anchorName,
}) = RichTextAnchorLink;