fromJson static method

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

Implementation

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

  return TextEntity(
    offset: (json['offset'] as int?) ?? 0,
    length: (json['length'] as int?) ?? 0,
    type: TextEntityType.fromJson(tdMapFromJson(json['type'])),
  );
}