setEnableCloseButton method

Future<void> setEnableCloseButton(
  1. bool enable
)

Sets street view to allow using close button or not. Web only

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

Implementation

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