setZoomControl method

Future<void> setZoomControl(
  1. bool enable
)

Sets street view to allow using zoom control or not. Web only

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

Implementation

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