easeCamera method
Future<bool?>
easeCamera(
- CameraUpdate cameraUpdate, {
- Duration? duration,
- CameraAnimationInterpolation? interpolation,
override
Eases the camera with an explicit easing curve.
Unlike animateCamera, which always uses the platform's default
ease-in/ease-out, this lets the caller pick the interpolation. Use
CameraAnimationInterpolation.linear for smooth continuous tracking
(e.g. following a moving GPS target) without velocity discontinuities
between successive calls.
Implementation
@override
Future<bool?> easeCamera(
CameraUpdate cameraUpdate, {
Duration? duration,
CameraAnimationInterpolation? interpolation,
}) async {
return _channel.invokeMethod('camera#ease', <String, dynamic>{
'cameraUpdate': cameraUpdate.toJson(),
'duration': duration?.inMilliseconds,
if (interpolation != null) 'interpolation': interpolation.name,
});
}