TextEntity.fromJson constructor

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

Parses a TextEntity from TDLib JSON.

Implementation

factory TextEntity.fromJson(Map<String, dynamic> json) => TextEntity(
      offset: _readInt(json['offset']),
      length: _readInt(json['length']),
      type: _readObject(json['type'], TextEntityType.fromJson),
    );