convertToObject function

TdObject convertToObject (
  1. String query
)

Implementation

TdObject convertToObject(String query) {
  if (query != null) {
    final newJson = json.decode(query);
    TdObject object = allObjects[newJson['@type']](newJson);
    return object;
  } else {
    return null;
  }
}