setViewpointWithDurationAndCurveCancelable method
- {required Viewpoint viewpoint,
- required double durationSeconds,
- required AnimationCurve curve}
Cancelable version of setViewpointWithDurationAndCurve. See that method for more information.
Implementation
CancelableOperation<bool> setViewpointWithDurationAndCurveCancelable(
{required Viewpoint viewpoint,
required double durationSeconds,
required AnimationCurve curve}) {
final taskHandle = _withThrowingErrorHandler((errorHandler) {
return runtimecore.RT_MapView_setViewpointWithDurationAndCurveAsync(
_handle,
viewpoint._handle,
durationSeconds,
curve.coreValue,
errorHandler);
});
return taskHandle
.toCancelableOperation((element) => element.getValueAsBool()!);
}