setPositionAnimated method

  1. @override
bool setPositionAnimated(
  1. LocationPoint point,
  2. double duration,
  3. AnimationType type
)
override

@brief Method is used to move the center of the circle with the specified animation. @param point Metrics coordinates of the center @see LocationPoint "LocationPoint". @param duration Animation duration in seconds. @param type Animation type @see AnimationType "AnimationType". Default: CENTER. @return true if the operation is successful, false otherwise.

Dart code snippet: @snippet location_window_map_objects_example.dart dart_CircleMapObject_setPositionAnimated

Implementation

@override
bool setPositionAnimated(LocationPoint point, double duration, AnimationType type) {
    final _setPositionAnimatedFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction<
        Uint8 Function(Pointer<Void>, Pointer<Void>, Float, Uint32),
        int Function(Pointer<Void>, Pointer<Void>, double, int)
      >('navigine_sdk_flutter_CircleMapObject_setPositionAnimated__Point_Duration_Type'));
    final _pointHandle = navigine_sdk_flutter_LocationPoint_ToFfi(point);
    final _durationHandle = navigine_sdk_flutter_double_ToFfi(duration);
    final _typeHandle = navigine_sdk_flutter_AnimationType_ToFfi(type);
    final _handle = this.handle;
    final __resultHandle = _setPositionAnimatedFfi(_handle, _pointHandle, _durationHandle, _typeHandle);
    navigine_sdk_flutter_LocationPoint_ReleaseFfiHandle(_pointHandle);
    navigine_sdk_flutter_double_ReleaseFfiHandle(_durationHandle);
    navigine_sdk_flutter_AnimationType_ReleaseFfiHandle(_typeHandle);
    final _result = navigine_sdk_flutter_bool_FromFfi(__resultHandle);
    navigine_sdk_flutter_bool_ReleaseFfiHandle(__resultHandle);
    return _result;
}