getChildEntity method

  1. @JSExport()
JSPromise<JSNumber> getChildEntity(
  1. ThermionEntity parent,
  2. String childName
)

Implementation

@JSExport()
JSPromise<JSNumber> getChildEntity(ThermionEntity parent, String childName) {
  return viewer
      .getChildEntity(
        parent,
        childName,
      )
      .then((entity) => entity.toJS)
      .onError((e, st) async {
    _logger.severe("Error getChildEntity : $e\n$st");
    return 0.toJS;
  }).toJS;
}