dir_picker 0.4.1
dir_picker: ^0.4.1 copied to clipboard
A Flutter plugin for picking directories and listing file system entries, supporting Android, iOS, macOS, Windows, Linux, and Web via FFI and JNI.
0.4.1 #
- Update document
0.4.0 #
- Add
DirPicker.listEntries()to list files and directories from a previously picked location - Add
FileSystemEntrywithrelativePath, metadata, and nullable weburi - Breaking:
DirPicker.pick()now takes a singlePickOptions? optionsparameter instead of separate per-platform named parameters (androidOptions,linuxOptions,macosOptions,windowsOptions) - Breaking: Rename
SelectedLocation→PickedLocation,NativeLocation→IOPickedLocation,WebSelectedLocation→WebPickedLocation - Add
PickOptionssealed class with platform-specific factory constructors:PickOptions.android(...),PickOptions.macos(...),PickOptions.linux(...),PickOptions.windows(...) - Migrate
jnigen.yamlandffigen.yamlto Dart scripts intool/directory for better maintainability (#3, authored by alihassan143) - Update
jnidependency to1.0.0(#3, authored by alihassan143) - Update
jnigendev dependency to0.16.0(#3, authored by alihassan143) - Fix
ffigenconfiguration to support latest API changes inffigen 20.1(#3, authored by alihassan143)
Migration guide #
// Before
DirPicker.pick(androidOptions: AndroidOptions(shouldPersist: true));
DirPicker.pick(macosOptions: MacosOptions(acceptLabel: 'Open'));
// After
DirPicker.pick(options: PickOptions.android(shouldPersist: true));
DirPicker.pick(options: PickOptions.macos(acceptLabel: 'Open'));
// Before
if (location is NativeLocation) { ... }
if (location is WebSelectedLocation) { ... }
// After
if (location is IOPickedLocation) { ... }
if (location is WebPickedLocation) { ... }
0.3.1 #
- Add README usage examples for handling
WebSelectedLocationon web andNativeLocationon native
0.3.0 #
- Breaking:
DirPicker.pick()now returnsSelectedLocation?instead ofUri? - Add
SelectedLocationabstract class withNativeLocation(native platforms) andWebSelectedLocation(web) - Web: return
WebSelectedLocationwrappingFileSystemDirectoryHandle— use.handleto access directory contents via the File System Access API - Web: throw
UnsupportedErroron browsers that do not supportshowDirectoryPicker()(Firefox/Safari)
0.2.1 #
- Fix Swift Package Manager detection on pub.dev
0.2.0 #
- Add Swift Package Manager (SPM) support for iOS and macOS
- Breaking: Rename
MacosOptions.prompt→MacosOptions.acceptLabelfor consistency with other platforms - Add
MacosOptions.messageparameter to customize the panel message - Fix
AndroidOptions.shouldPersistdefault value tofalse
0.1.0 #
- Initial version