RichText.phoneNumber constructor

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

A text with a phone number.

Implementation

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

  /// The text
  @JsonKey(name: 'text') @RichTextConverter() required RichText text,

  /// The phone number
  @JsonKey(name: 'phone_number') required String phoneNumber,
}) = RichTextPhoneNumber;