Viewing version 2.0.1. Open the latest package page.
windows_file_picker
2.0.1Windows implementation of the file_picker plugin using Win32 COM APIs for native file and directory picking.
Readme
File Picker for Windows
windows_file_picker
The Windows implementation of file_picker.
Usage
This package is endorsed, which means you can simply use file_picker as normal, and the Windows implementation will be automatically included.
Changelog
2.0.1
- Fixed
pickFileAndDirectoryPaths()returning URI paths instead of Windows paths. #2225
2.0.0
- BREAKING CHANGE:
PlatformFile.length()now returnsFuture<int?>instead ofFuture<int>. Returnsnullwhen the length could not be determined (e.g. a failed disk read), instead of0, matchinglengthSync(). #2197
1.3.0
- Added
WindowsOptions.acceptLabel, letting callers set the confirm ("OK") button text onpickFile(),pickFiles(),getDirectoryPath(), andsaveFile()dialogs, viaIFileDialog.SetOkButtonLabel. #1861
1.2.0
- Implemented
PlatformFile.lengthSync(). The picker only returns a file path, not its size, so this returnsnullon Windows, uselength()to actually read it from disk.
1.1.0
- Migrated
pickFile(),pickFiles(), andsaveFile()from the legacyGetOpenFileNameW/GetSaveFileNameWcommon dialogs to the modernIFileOpenDialog/IFileSaveDialogCOM APIs, the same patterngetDirectoryPath()already used. This is a prerequisite for supporting custom dialog button text and other Common Item Dialog features on those entry points. Fixes #2173. - Removed the internal Win32 helpers tied to the legacy dialogs (
fileTypeToFileFilter,extractSelectedFilesFromOpenFileNameW,OPENFILENAMEW,GetOpenFileNameW,GetSaveFileNameW, and theofn*constants). These were implementation details of the removed dialog code, not part of the supported plugin API. - Tightened the
file_picker_platform_interfacelower bound to^3.2.0. This package'spickFile()/pickFiles()signatures referenceDarwinOptions, added in that version, so resolving against an older one would fail to compile.
1.0.2
- Fix saved files missing their extension when the user types a file name without one: set
lpstrDefExtonOPENFILENAMEWso Windows appends the default extension (derived from the allowed extensions or the suggested file name). Fixes #2139.
1.0.1
- Improved package description, added example, and added missing API documentation.
1.0.0
- Initial release of Windows implementation package for
file_picker.
Installing
export PUB_HOSTED_URL=https://pub.mirror.p-hatan.com
flutter pub add 'windows_file_picker:2.0.1'pubspec.yaml
name: windows_file_picker
description: Windows implementation of the file_picker plugin using Win32 COM APIs for native file and directory picking.
version: 2.0.1
homepage: https://github.com/vicajilau/flutter_file_picker/tree/main/packages/file_picker_windows
repository: https://github.com/vicajilau/flutter_file_picker/tree/main/packages/file_picker_windows
topics:
- file-picker
- windows
resolution: workspace
environment:
sdk: ">=3.10.0 <4.0.0"
flutter: ">=3.38.0"
flutter:
plugin:
implements: file_picker
platforms:
windows:
dartPluginClass: FilePickerWindows
dependencies:
flutter:
sdk: flutter
file_picker_platform_interface: ^4.0.0
cross_file: ^0.3.5+4
ffi: ^2.2.0
meta: ^1.17.0
path: ^1.9.1
win32: ^6.3.0
dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^6.0.0
Version history
| Version | Published | Archive | SHA-256 |
|---|---|---|---|
| 1.0.0 | On demand | Download | bb25e1b0…f68406 |
| 1.0.1 | On demand | Download | 72cf2346…33de26 |
| 1.0.2 | On demand | Download | 1659127c…e3026a |
| 1.1.0 | On demand | Download | 225f58e6…c9b5a5 |
| 1.2.0 | On demand | Download | d999c1c0…308caf |
| 1.3.0 | On demand | Download | 62e6e6e1…91ad96 |
| 2.0.0 | On demand | Download | 9f3aa833…43602e |
| 2.0.1 | Cached · Upstream SHA-256 matched | Download | 18452aa2…875072 |
Dependencies
cross_file "^0.3.5+4"
ffi "^2.2.0"
file_picker_platform_interface "^4.0.0"
flutter {
"sdk": "flutter"
}
meta "^1.17.0"
path "^1.9.1"
win32 "^6.3.0"