fromJson static method
Implementation
static FormattedText? fromJson(Map<String, dynamic>? json) {
if (json == null) {
return null;
}
return FormattedText(
text: (json['text'] as String?) ?? '',
entities: List<TextEntity>.from(
tdListFromJson(json['entities'])
.map((item) => TextEntity.fromJson(tdMapFromJson(item)))
.whereType<TextEntity>(),
),
);
}