setMotionTracking method

Future<void> setMotionTracking(
  1. bool enable
)

Sets street view to allow using motion tracking or not. Web only

Return Future while the change has been made on the platform side.

Implementation

Future<void> setMotionTracking(bool enable) {
  if (!kIsWeb)
    throw UnsupportedError(
        "[setMotionTracking] is not yet supported for Web.");
  if (enable == _isMotionTracking) return Future.delayed(Duration.zero);
  return _streetViewFlutterPlatform
      .setMotionTracking(viewId, enable)
      .then((value) => _isMotionTracking = enable);
}