RichBlock.pre constructor
const
RichBlock.pre({
- @JsonKey.new(name: 'type') @Default.new(RichBlockType.pre) RichBlockType type,
- @JsonKey.new(name: 'text') @RichTextConverter() required RichText text,
- @JsonKey.new(name: 'language') String? language,
A preformatted text block, corresponding to the nested HTML tags <pre> and <code>.
Implementation
const factory RichBlock.pre({
/// Type of the block, always "pre"
@JsonKey(name: 'type') @Default(RichBlockType.pre) RichBlockType type,
/// Text of the block
@JsonKey(name: 'text') @RichTextConverter() required RichText text,
/// Optional. The programming language of the text
@JsonKey(name: 'language') String? language,
}) = RichBlockPreformatted;