setVisible method

Future<void> setVisible(
  1. bool enable
)

Sets street view is visible. Web only

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

Implementation

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