fromJson static method

RichTextPhoneNumber? fromJson(
  1. Map<String, dynamic>? json
)
override

Implementation

static RichTextPhoneNumber? fromJson(Map<String, dynamic>? json) {
  if (json == null) {
    return null;
  }

  return RichTextPhoneNumber(
    text: RichText.fromJson(tdMapFromJson(json['text'])),
    phoneNumber: (json['phone_number'] as String?) ?? '',
  );
}