setViewpointWithDurationAndCurve method
- {required Viewpoint viewpoint,
- required double durationSeconds,
- required AnimationCurve curve}
Animates the display to the new viewpoint using the provided animation curve. The AnimationCurve defines the animation easing function.
Parameters:
viewpoint
— The visible area to display in the view.durationSeconds
— The time for the transition animation to complete, in seconds.curve
— The type of animation curve.
Return Value: A Future.
Implementation
Future<bool> setViewpointWithDurationAndCurve(
{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.toFuture((element) => element.getValueAsBool()!);
}