pub repository
mirror.p-hatan.irfile_picker_platform_interface
3.4.0A common platform interface for the file_picker plugin, defining the shared API surface and data contracts across platforms.
Readme
file_picker_platform_interface
A common platform interface for the file_picker plugin.
This package defines the interface that all platform implementation packages for file_picker (such as android_file_picker, file_picker_darwin, windows_file_picker, file_picker_linux, file_picker_web) must implement.
Usage
To implement a new platform plugin for file_picker, extend FilePickerPlatform and register your implementation:
class FilePickerCustomPlatform extends FilePickerPlatform {
static void registerWith() {
FilePickerPlatform.instance = FilePickerCustomPlatform();
}
// Implement methods...
}
Changelog
3.4.0
- Added
acceptLabeltoWindowsOptionsandDarwinOptions, letting callers set the confirm button text of the file dialog. On Windows it applies topickFile(),pickFiles(),getDirectoryPath(), andsaveFile(); on macOS only topickFile()/pickFiles()(getDirectoryPath()/saveFile()do not acceptDarwinOptions). Has no effect on iOS, Android or Web. #1861
3.3.0
- Added
PlatformFile.lengthSync(), a nullableintreturning the file's length in bytes as provided by the underlying file picker result, ornullwhen it did not report one. Named to pair with the existinglength(), the same waydart:io'sFiledoes.
3.2.0
- Added
FilePickerPlatform.skipEntitlementsChecks(), a no-op default hook that platform implementations can override. Letsfile_pickerdispatch through the platform interface instead of importingfile_picker_darwindirectly, which kept the facade package from being wasm compatible. - Added
DarwinOptionsandDarwinAssetRepresentationMode, letting callers request a specific asset representation (currentorcompatible) for media selected from the iOS photo library, instead of always using the system default (automatic). Restores functionality that was available before the Darwin implementation was rewritten (previously exposed as a way to disable compression), useful to avoid expensive transcoding for large HEVC, HDR, or slow-motion videos.
3.1.0
- Added
PlatformFile.extension, restoring the pre-12.0 convenience getter that was dropped during the federated rewrite. Returns the file extension ofnamewithout the leading dot, ornullif there is none.
3.0.1
- Improved package description, added example, and added missing API documentation.
3.0.0
- Unified platform interface release for federated
file_pickerarchitecture.
2.0.0
- Deprecates interface in favor of standalone
file_pickerfor all platforms.
1.3.1
- Removes
allowCompressionfrom interface as it should only be used fromfile_picker(Android & iOS).
1.3.0
- Adds
allowCompressionparameter.
1.2.0
- Adds
FilePickerStatus.
1.1.0
- Implements
getDirectoryPath().
1.0.0
- Implements
getFiles().
0.0.3
- Removes
getFilePath().
0.0.2
- Updates methods from File Picker interface.
0.0.1
- Added File Picker platform interface.
Installing
export PUB_HOSTED_URL=https://pub.mirror.p-hatan.ir
flutter pub add file_picker_platform_interfacepubspec.yaml
name: file_picker_platform_interface
description: A common platform interface for the file_picker plugin, defining the shared API surface and data contracts across platforms.
version: 3.4.0
homepage: https://github.com/vicajilau/flutter_file_picker/tree/main/packages/file_picker_platform_interface
repository: https://github.com/vicajilau/flutter_file_picker/tree/main/packages/file_picker_platform_interface
topics:
- file-picker
- platform-interface
resolution: workspace
environment:
sdk: ">=3.10.0 <4.0.0"
flutter: ">=3.38.0"
dependencies:
flutter:
sdk: flutter
plugin_platform_interface: ^2.1.8
cross_file: ^0.3.5+4
path: ^1.9.1
dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^6.0.0
Version history
| Version | Published | Archive | SHA-256 |
|---|---|---|---|
| 0.0.1 | 2020-05-10T14:42:20.306048Z | Download | 36693dad55b79ae37cd54b64ad53a55cbfe114699059c92263ce0d2179826808 |
| 0.0.1+1 | 2020-05-10T14:45:03.232110Z | Download | c1fe66304e3d753244757a3552975432301eb850a30f375b0b0ef0cfc70af199 |
| 0.0.2 | 2020-05-10T15:59:02.572974Z | Download | 90dd6269d98d7d7c5b2e3c8eb207f12715d8d94a3984925832779eddb046fd22 |
| 0.0.3 | 2020-05-10T16:09:13.995364Z | Download | 4e9f947388df789c0549f3e9ce69f6c305ca694602dc38eff639d041c25f9506 |
| 1.0.0 | 2020-05-10T17:37:14.416178Z | Download | 1ebbcf61c6eafc15ad387a47a7f8e06c17b6629cc36f10fed1595d91690913d5 |
| 1.1.0 | 2020-06-11T18:02:14.036770Z | Download | 946955a1e27c4e552f03fb68186de07c164cfa0aa295787b8d3d322717b4c937 |
| 1.2.0 | 2020-06-11T21:35:40.793649Z | Download | ff068bf75e0bc06b2d408f87a0746d79de58f08d3c711d90c7489b7f77e59ecb |
| 1.3.0 | 2020-07-20T12:31:15.152934Z | Download | 00fd05bc2ecd8ddbe31e8d1d96e7c2988899ae4d22a685d72f09b1c12c37203e |
| 1.3.1 | 2020-07-23T14:39:38.619751Z | Download | fdd0f666cf606bcb9cc6dfac20d72f709ea6cec3289b457da27abeeef02abf0e |
| 2.0.0 | 2020-09-11T17:03:29.969818Z | Download | 705932714f3e2fdff753eaec2af93832ad1aeff9936aec1ec72a2b46e6538566 |
| 3.0.0 | 2026-08-14T07:22:54.733956Z | Download | bfa1bfc65e92d521063ebebe6ffea4e7b0c0be87bbae52d9e69aab08cd2f94f4 |
| 3.0.1 | 2026-08-15T16:46:23.894830Z | Download | 9e7a7e01e179929241f0afeb2c8c69ac95e29e17c0abea36ed193881c6bef90c |
| 3.1.0 | 2026-08-25T11:01:29.087780Z | Download | b1ddd7909853c9df0eb4dbc5b388837ff313e28d6d5a9a71a83794b70c4c86bd |
| 3.2.0 | 2026-08-28T12:16:09.343131Z | Download | 11ef1b5c14d9186b4788cc273dd8d5cb81bca847145060991a28234ff7916fc1 |
| 3.3.0 | 2026-09-02T17:14:30.545172Z | Download | d35d8cb68446fae921335bb61501d66cb2469d74c8f3103b8c6ccdbe3fe5afd8 |
| 3.4.0 | 2026-09-11T05:46:20.590122Z | Download | 0355558fd9af6da499d18e333d6b3beb44b0bf19e00933fccd15d18eb8d0e9ca |
| 4.0.0 | 2026-09-14T07:36:36.783383Z | Download | bbdc085a6f168e63f147e9ce8988f79fa0800a58e7f25a48f762c60837107ba5 |
| 4.1.0 | 2026-10-11T08:31:54.512771Z | Download | a78bd8ec992ae34ce32f57157422bd532967510d2ebb6fc251756472bbde7160 |
| 4.2.0 | 2026-10-13T05:29:10.395265Z | Download | 336e7168306834a2b68e6168ed768e00d3fabeac23154d5793e277ca9f97cf20 |
Dependencies
cross_file "^0.3.5+4"
flutter {
"sdk": "flutter"
}
path "^1.9.1"
plugin_platform_interface "^2.1.8"