dir_picker 0.5.1
dir_picker: ^0.5.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.5.1 #
- Fix
flutter build web --wasm. The FFI/JNI implementations are now excluded withdart.library.js_interopinstead ofdart.library.html, which is false under dart2wasm (#4, authored by coco-de-dev) - Linux:
pick()now throwsUnsupportedErrorwhen no XDG Desktop Portal, zenity or kdialog is available. Before, it returnednull, which looked like a user cancel (#11) WebPickedLocationis now declared on native platforms too, solocation is WebPickedLocation(as in the README) compiles everywhere. Before, it failed with "'WebPickedLocation' isn't a type" outside the web (#12)- Allow
dbus0.8.x (#8) - Format code with the current
dart formatand silence a lint in the generated JNI bindings (#7) - Correct the Android minimum (API 24+) and the
AndroidOptions.shouldPersistdefault (false) in the README, and note Wasm support (#6)
0.5.0 #
- Breaking: Raise minimum supported SDK to Flutter 3.44 / Dart 3.12
- Migrate Android to built-in Kotlin (no longer applies the Kotlin Gradle Plugin)
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