dispatchUIFunction method

void dispatchUIFunction(
  1. int instanceId,
  2. int id,
  3. String name,
  4. String functionName,
  5. VoltronArray params,
  6. Promise promise,
)

Implementation

void dispatchUIFunction(
  int instanceId,
  int id,
  String name,
  String functionName,
  VoltronArray params,
  Promise promise,
) {
  final node = findNode(instanceId, id);
  final controller = findController(name);
  if (node != null && controller != null) {
    controller.dispatchFunction(
      node.renderViewModel,
      functionName,
      params,
      promise: promise.isCallback() ? promise : null,
    );
  }
}