RichText.code constructor

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

A monowidth text.

Implementation

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

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