dispatchFunction method

void dispatchFunction(
  1. T viewModel,
  2. String functionName,
  3. VoltronArray array, {
  4. Promise? promise,
})

Implementation

void dispatchFunction(
  T viewModel,
  String functionName,
  VoltronArray array, {
  Promise? promise,
}) {
  switch (functionName) {
    case DevtoolsUtil.kGetScreenShot:
      DevtoolsUtil.getScreenShot(viewModel, array, promise);
      break;
    case DevtoolsUtil.kAddFrameCallback:
      DevtoolsUtil.addFrameCallback(viewModel, array, promise);
      break;
    case DevtoolsUtil.kRemoveFrameCallback:
      DevtoolsUtil.removeFrameCallback(viewModel, array, promise);
      break;
    case DevtoolsUtil.kGetLocationOnScreen:
      DevtoolsUtil.getLocationOnScreen(viewModel, array, promise);
      break;
    case kMeasureInWindow:
      measureInWindow(viewModel, array, promise);
      break;
    case kGETBoundingClientRect:
      getBoundingClientRect(viewModel, array, promise);
      break;
    default:
      break;
  }
}