setBuffer method

  1. @override
bool setBuffer(
  1. double width,
  2. double height
)
override

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 __resultHandle = _setBufferFfi(this.ptr, width, height);
    final _result = (__resultHandle != 0);
    exception.checkCallResult();
    return _result;
}