flushUICommand function

void flushUICommand(
  1. WebFViewController view,
  2. Pointer<NativeBindingObject> selfPointer
)

Implementation

void flushUICommand(WebFViewController view, Pointer<NativeBindingObject> selfPointer) {
  if (view.disposed) return;
  assert(_allocatedPages.containsKey(view.contextId));

  if (view.rootController.isFontsLoading) {
    SchedulerBinding.instance.scheduleFrameCallback((timeStamp) {
      flushUICommand(view, selfPointer);
    });
    return;
  }

  List<UICommand> commands = nativeUICommandToDartFFI(view.contextId);
  execUICommands(view, commands);
  SchedulerBinding.instance.scheduleFrame();
}