setPositionAnimated method
Animates the model anchor to a new position.
point Target metrics coordinates LocationPoint.
duration Animation duration in seconds.
type Animation easing AnimationType.
Returns true if the operation is successful, false otherwise.
Example:
bool posAnimOk = m.setPositionAnimated(
LocationPoint(15.0, 40.0),
0.5,
AnimationType.SINE,
);
print("Model setPositionAnimated: $posAnimOk");
Implementation
@override
bool setPositionAnimated(LocationPoint point, double duration, AnimationType type) {
final _setPositionAnimatedFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction<
Uint8 Function(Pointer<Void>, LocationPointNative, Float, Uint32),
int Function(Pointer<Void>, LocationPointNative, double, int)
>('navigine_sdk_flutter_ModelMapObject_setPositionAnimated__Point_Duration_Type'));
final __resultHandle = _setPositionAnimatedFfi(this.ptr, LocationPointImpl.toNative(point), duration, AnimationTypeImpl.toInt(type));
final _result = (__resultHandle != 0);
exception.checkCallResult();
return _result;
}