fromJson static method

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

Implementation

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

  return RichTextUrl(
    text: RichText.fromJson(tdMapFromJson(json['text'])),
    url: (json['url'] as String?) ?? '',
    isCached: (json['is_cached'] as bool?) ?? false,
  );
}