setPanningGesturesEnabled method

Future<void> setPanningGesturesEnabled(
  1. bool enable
)

Sets street view to allow using panning gesture or not. Web not support and isPanningGesturesEnabled always be true

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

Implementation

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