setBuffer method
Method is used to specify the buffer size around the circle for collision detection.
width Width of the buffer in pixels. Default: 0.
height Height of the buffer in pixels. Default: 0.
Returns true if the operation is successful, false otherwise.
Example:
// Set collision buffer
bool bufferSuccess = _circleMapObject!.setBuffer(5.0, 5.0);
print("Set collision buffer to 5x5 pixels: $bufferSuccess");
Implementation
@override
bool setBuffer(double width, double height) {
final _setBufferFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction<
Uint8 Function(Pointer<Void>, Float, Float),
int Function(Pointer<Void>, double, double)
>('navigine_sdk_flutter_CircleMapObject_setBuffer__Width_Height'));
final _widthHandle = navigine_sdk_flutter_double_ToFfi(width);
final _heightHandle = navigine_sdk_flutter_double_ToFfi(height);
final _handle = this.handle;
final __resultHandle = _setBufferFfi(_handle, _widthHandle, _heightHandle);
navigine_sdk_flutter_double_ReleaseFfiHandle(_widthHandle);
navigine_sdk_flutter_double_ReleaseFfiHandle(_heightHandle);
final _result = navigine_sdk_flutter_bool_FromFfi(__resultHandle);
navigine_sdk_flutter_bool_ReleaseFfiHandle(__resultHandle);
return _result;
}