FormattedText.fromJson constructor

FormattedText.fromJson(
  1. Map<String, dynamic> json
)

Parse from a json

Implementation

factory FormattedText.fromJson(Map<String, dynamic> json) => FormattedText(
      text: json['text'],
      entities: List<TextEntity>.from((json['entities'] ?? [])
          .map((item) => TextEntity.fromJson(item))
          .toList()),
      extra: json['@extra'],
      clientId: json['@client_id'],
    );