onAddWatcherRequested property

EventStream<OnAddWatcherRequestedEvent> get onAddWatcherRequested

Raised when setting a new directory watcher is requested. If an error occurs, then errorCallback must be called.

Implementation

EventStream<OnAddWatcherRequestedEvent> get onAddWatcherRequested =>
    $js.chrome.fileSystemProvider.onAddWatcherRequested.asStream(($c) => (
          $js.AddWatcherRequestedOptions options,
          $js.ProviderSuccessCallback successCallback,
          $js.ProviderErrorCallback errorCallback,
        ) {
          return $c(OnAddWatcherRequestedEvent(
            options: AddWatcherRequestedOptions.fromJS(options),
            successCallback: () {
              successCallback.callAsFunction(
                null,
              );
            },
            errorCallback: (ProviderError error) {
              errorCallback.callAsFunction(null, error.toJS);
            },
          ));
        }.toJS);