RichText.anchor constructor

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

An anchor.

Implementation

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

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