RichText.reference constructor

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

A reference.

Implementation

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

  /// Text of the reference
  @JsonKey(name: 'text') @RichTextConverter() required RichText text,

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