onCreateFileRequested property

EventStream<OnCreateFileRequestedEvent> get onCreateFileRequested

Raised when creating a file is requested. If the file already exists, then errorCallback must be called with the "EXISTS" error code.

Implementation

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