RichText.subscript constructor

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

A subscript text.

Implementation

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

  /// The text
  @JsonKey(name: 'text') @RichTextConverter() required RichText text,
}) = RichTextSubscript;