RichText.spoiler constructor
const
RichText.spoiler({
- @JsonKey.new(name: 'type') @Default.new(RichTextType.spoiler) RichTextType type,
- @JsonKey.new(name: 'text') @RichTextConverter() required RichText text,
A text covered by a spoiler.
Implementation
const factory RichText.spoiler({
/// Type of the rich text, always "spoiler"
@JsonKey(name: 'type') @Default(RichTextType.spoiler) RichTextType type,
/// The text
@JsonKey(name: 'text') @RichTextConverter() required RichText text,
}) = RichTextSpoiler;