showDirectoryPicker static method

Prompts the user to select a directory using window.showDirectoryPicker() (File System Access API) and returns the resulting FileSystemOpfsWebDirectoryHandle, suitable for withRootHandle.

See FileSystemOpfsWebShowDirectoryPickerOptions for the available options (id, mode, startIn).

Chromium-only, must be called from a user gesture. Throws if the user cancels the picker or if the browser does not support it.

Only available on the web.

Implementation

static Future<FileSystemOpfsWebDirectoryHandle> showDirectoryPicker([
  FileSystemOpfsWebShowDirectoryPickerOptions? options,
]) => fileSystemOpfsWebShowDirectoryPickerImpl(options);