RichBlock.anchor constructor

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

A block with an anchor, corresponding to the HTML tag <a> with the attribute name.

Implementation

const factory RichBlock.anchor({
  /// Type of the block, always "anchor"
  @JsonKey(name: 'type') @Default(RichBlockType.anchor) RichBlockType type,

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