calculateNodeLayout function
Implementation
Pointer<Int64> calculateNodeLayout(
int engineId,
int rootId,
int nodeId,
double width,
int widthMode,
double height,
int heightMode,
) {
try {
final bridge = VoltronRenderBridgeManager.bridgeMap[engineId];
var layoutParams = FlexLayoutParams(width, height, widthMode, heightMode);
var result = layoutParams.defaultOutput();
if (bridge != null) {
result = bridge.calculateNodeLayout(rootId, nodeId, layoutParams);
}
final resultPtr = malloc<Int64>(1);
resultPtr.asTypedList(1)[0] = result;
return resultPtr;
} catch (err) {
LogUtils.d('calculateNodeLayout', err.toString());
}
return Pointer.fromAddress(0);
}