createCfiSelectedText method
Returns the CFI for the region, specified by borderPositions.
borderPositions is an array of int in LTRB format. Two points should be specified.
Use getTextSymbols to receive symbol coordinates.
Implementation
String createCfiSelectedText(List<int> borderPositions) {
Pointer<BufferArray> positionsArray = allocNewBufferArray(sizeOf<Int64>(), 8);
Pointer<Int64> positionsBuffer = positionsArray.ref.data.cast();
for (int i = 0; i < 8; i++) {
positionsBuffer[i] = borderPositions[i];
}
Pointer<BufferString> str = (createCfiSelectedTextNative?.call(_sdk, positionsArray))!;
freeBufferArray(positionsArray);
String result = str == nullptr ? '' : str.ref.toString();
if (str != nullptr) {
freeBufferString(str);
}
return result;
}