setInteractive method

  1. @override
bool setInteractive(
  1. bool interactive
)
override

Method is used to specify whether the map object can be interacted with. interactive Specifies whether the object can be picked in the pickMapObjectAt method (true) or not (false). Default: false. Returns true if the operation is successful, false otherwise.

Example:

// Set interactive mode
bool interactiveSuccess = _circleMapObject!.setInteractive(true);
print("Set circle interactive to true: $interactiveSuccess");

Implementation

@override
bool setInteractive(bool interactive) {
    final _setInteractiveFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction<
        Uint8 Function(Pointer<Void>, Uint8),
        int Function(Pointer<Void>, int)
      >('navigine_sdk_flutter_MapObject_setInteractive__Interactive'));
    final _interactiveHandle = navigine_sdk_flutter_bool_ToFfi(interactive);
    final _handle = this.handle;
    final __resultHandle = _setInteractiveFfi(_handle, _interactiveHandle);
    navigine_sdk_flutter_bool_ReleaseFfiHandle(_interactiveHandle);
    final _result = navigine_sdk_flutter_bool_FromFfi(__resultHandle);
    navigine_sdk_flutter_bool_ReleaseFfiHandle(__resultHandle);
    return _result;
}