RichText.url constructor
const
RichText.url({
- @JsonKey.new(name: 'type') @Default.new(RichTextType.url) RichTextType type,
- @JsonKey.new(name: 'text') @RichTextConverter() required RichText text,
- @JsonKey.new(name: 'url') required String url,
A text with a link.
Implementation
const factory RichText.url({
/// Type of the rich text, always "url"
@JsonKey(name: 'type') @Default(RichTextType.url) RichTextType type,
/// The text
@JsonKey(name: 'text') @RichTextConverter() required RichText text,
/// URL of the link
@JsonKey(name: 'url') required String url,
}) = RichTextUrl;