TextQuote.fromJson constructor

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

Creates a TextQuote object from a JSON object.

Implementation

factory TextQuote.fromJson(Map<String, dynamic> json) {
  return TextQuote(
    text: json['text'],
    entities: json['entities'] != null
        ? (json['entities'] as List)
            .map((e) => MessageEntity.fromJson(e))
            .toList()
        : null,
    position: json['position'],
    isManual: json['is_manual'],
  );
}