resizeWindow method

void resizeWindow(
  1. String windowId,
  2. double width,
  3. double height
)

Resize a palette window synchronously.

This is the critical FFI call used by SizeReporter to resize the native window in the same frame as content measurement, avoiding flicker.

Implementation

void resizeWindow(String windowId, double width, double height) {
  final idPtr = windowId.toNativeUtf8().cast<Char>();
  try {
    _bindings.ResizeWindow(idPtr, width, height);
  } finally {
    calloc.free(idPtr);
  }
}