onMountRequested property

EventStream<OnMountRequestedEvent> get onMountRequested

Raised when showing a dialog for mounting a new file system is requested. If the extension/app is a file handler, then this event shouldn't be handled. Instead app.runtime.onLaunched should be handled in order to mount new file systems when a file is opened. For multiple mounts, the file_system_provider.multiple_mounts manifest option must be set to true.

Implementation

EventStream<OnMountRequestedEvent> get onMountRequested =>
    $js.chrome.fileSystemProvider.onMountRequested.asStream(($c) => (
          $js.ProviderSuccessCallback successCallback,
          $js.ProviderErrorCallback errorCallback,
        ) {
          return $c(OnMountRequestedEvent(
            successCallback: () {
              //ignore: avoid_dynamic_calls
              (successCallback as Function)();
            },
            errorCallback: (ProviderError error) {
              //ignore: avoid_dynamic_calls
              (errorCallback as Function)(error.toJS);
            },
          ));
        });