setAnchor method

  1. @override
void setAnchor(
  1. Point<double> anchor
)
override

Sets anchor point for user indicator in screen pixels.

Example:

ScreenPoint anchor = ScreenPoint(100.0, 200.0);
_userLocationLayer!.setAnchor(anchor);
print("Set user location anchor to: (${anchor.x}, ${anchor.y})");

Implementation

@override
void setAnchor(math.Point<double> anchor) {
    final _setAnchorFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction<
        Void Function(Pointer<Void>, ScreenPointNative),
        void Function(Pointer<Void>, ScreenPointNative)
      >('navigine_sdk_flutter_UserLocationLayer_setAnchor__Anchor'));
    _setAnchorFfi(this.ptr, ScreenPointImpl.toNative(anchor));
    exception.checkCallResult();
}