addFrameCallback static method

void addFrameCallback(
  1. RenderViewModel viewModel,
  2. VoltronArray array,
  3. Promise? promise
)

Implementation

static void addFrameCallback(RenderViewModel viewModel, VoltronArray array, Promise? promise) {
  if (array.size() > 0) {
    final paramsMap = array.get<VoltronMap>(0);
    final callbackId = paramsMap?.get<int>(kFrameCallbackId);
    _callbacks[callbackId] = promise;
    SchedulerBinding.instance.addPostFrameCallback(onPostFrame);
  }
}