p-hatan/ mirror

pub repository

mirror.p-hatan.ir

file_picker_platform_interface

3.4.0

A common platform interface for the file_picker plugin, defining the shared API surface and data contracts across platforms.

Download archive

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 acceptLabel to WindowsOptions and DarwinOptions, letting callers set the confirm button text of the file dialog. On Windows it applies to pickFile(), pickFiles(), getDirectoryPath(), and saveFile(); on macOS only to pickFile()/pickFiles() (getDirectoryPath()/saveFile() do not accept DarwinOptions). Has no effect on iOS, Android or Web. #1861

3.3.0

  • Added PlatformFile.lengthSync(), a nullable int returning the file's length in bytes as provided by the underlying file picker result, or null when it did not report one. Named to pair with the existing length(), the same way dart:io's File does.

3.2.0

  • Added FilePickerPlatform.skipEntitlementsChecks(), a no-op default hook that platform implementations can override. Lets file_picker dispatch through the platform interface instead of importing file_picker_darwin directly, which kept the facade package from being wasm compatible.
  • Added DarwinOptions and DarwinAssetRepresentationMode, letting callers request a specific asset representation (current or compatible) 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 of name without the leading dot, or null if 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_picker architecture.

2.0.0

  • Deprecates interface in favor of standalone file_picker for all platforms.

1.3.1

  • Removes allowCompression from interface as it should only be used from file_picker (Android & iOS).

1.3.0

  • Adds allowCompression parameter.

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_interface
pubspec.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

VersionPublishedArchiveSHA-256
0.0.12020-05-10T14:42:20.306048ZDownload36693dad55b79ae37cd54b64ad53a55cbfe114699059c92263ce0d2179826808
0.0.1+12020-05-10T14:45:03.232110ZDownloadc1fe66304e3d753244757a3552975432301eb850a30f375b0b0ef0cfc70af199
0.0.22020-05-10T15:59:02.572974ZDownload90dd6269d98d7d7c5b2e3c8eb207f12715d8d94a3984925832779eddb046fd22
0.0.32020-05-10T16:09:13.995364ZDownload4e9f947388df789c0549f3e9ce69f6c305ca694602dc38eff639d041c25f9506
1.0.02020-05-10T17:37:14.416178ZDownload1ebbcf61c6eafc15ad387a47a7f8e06c17b6629cc36f10fed1595d91690913d5
1.1.02020-06-11T18:02:14.036770ZDownload946955a1e27c4e552f03fb68186de07c164cfa0aa295787b8d3d322717b4c937
1.2.02020-06-11T21:35:40.793649ZDownloadff068bf75e0bc06b2d408f87a0746d79de58f08d3c711d90c7489b7f77e59ecb
1.3.02020-07-20T12:31:15.152934ZDownload00fd05bc2ecd8ddbe31e8d1d96e7c2988899ae4d22a685d72f09b1c12c37203e
1.3.12020-07-23T14:39:38.619751ZDownloadfdd0f666cf606bcb9cc6dfac20d72f709ea6cec3289b457da27abeeef02abf0e
2.0.02020-09-11T17:03:29.969818ZDownload705932714f3e2fdff753eaec2af93832ad1aeff9936aec1ec72a2b46e6538566
3.0.02026-08-14T07:22:54.733956ZDownloadbfa1bfc65e92d521063ebebe6ffea4e7b0c0be87bbae52d9e69aab08cd2f94f4
3.0.12026-08-15T16:46:23.894830ZDownload9e7a7e01e179929241f0afeb2c8c69ac95e29e17c0abea36ed193881c6bef90c
3.1.02026-08-25T11:01:29.087780ZDownloadb1ddd7909853c9df0eb4dbc5b388837ff313e28d6d5a9a71a83794b70c4c86bd
3.2.02026-08-28T12:16:09.343131ZDownload11ef1b5c14d9186b4788cc273dd8d5cb81bca847145060991a28234ff7916fc1
3.3.02026-09-02T17:14:30.545172ZDownloadd35d8cb68446fae921335bb61501d66cb2469d74c8f3103b8c6ccdbe3fe5afd8
3.4.02026-09-11T05:46:20.590122ZDownload0355558fd9af6da499d18e333d6b3beb44b0bf19e00933fccd15d18eb8d0e9ca
4.0.02026-09-14T07:36:36.783383ZDownloadbbdc085a6f168e63f147e9ce8988f79fa0800a58e7f25a48f762c60837107ba5
4.1.02026-10-11T08:31:54.512771ZDownloada78bd8ec992ae34ce32f57157422bd532967510d2ebb6fc251756472bbde7160
4.2.02026-10-13T05:29:10.395265ZDownload336e7168306834a2b68e6168ed768e00d3fabeac23154d5793e277ca9f97cf20

Dependencies

cross_file "^0.3.5+4"

flutter { "sdk": "flutter" }

path "^1.9.1"

plugin_platform_interface "^2.1.8"