file_selector_platform_interface

2.7.0

A common platform interface for the file_selector plugin.

Download archive

Readme

file_selector_platform_interface

A common platform interface for the file_selector plugin.

This interface allows platform-specific implementations of the file_selector plugin, as well as the plugin itself, to ensure they are supporting the same interface.

Usage

To implement a new platform-specific implementation of file_selector, extend FileSelectorPlatform with an implementation that performs the platform-specific behavior, and when you register your plugin, set the default FileSelectorPlatform by calling FileSelectorPlatform.instance = MyPlatformFileSelector().

Note on breaking changes

Strongly prefer non-breaking changes (such as adding a method to the interface) over breaking changes for this package.

See https://flutter.dev/go/platform-interface-breaking-changes for a discussion on why a less-clean interface is preferable to a breaking change.

Changelog

2.7.0

  • Adds canCreateDirectories parameter to FileDialogOptions to control whether directory creation is enabled during path selection.
  • Updates minimum supported SDK version to Flutter 3.29/Dart 3.7.

2.6.2

  • Updates minimum required plugin_platform_interface version to 2.1.7.
  • Updates minimum supported SDK version to Flutter 3.10/Dart 3.0.

2.6.1

  • Adds pub topics to package metadata.
  • Updates minimum supported SDK version to Flutter 3.7/Dart 2.19.

2.6.0

  • Adds getSaveLocation and deprecates getSavePath.

2.5.1

  • Adds compatibility with http 1.0.
  • Updates minimum supported SDK version to Flutter 3.3/Dart 2.18.

2.5.0

  • Deprecates macUTIs in favor of uniformTypeIdentifiers.
  • Aligns Dart and Flutter SDK constraints.

2.4.1

  • Updates links for the merge of flutter/plugins into flutter/packages.
  • Updates minimum Flutter version to 3.0.

2.4.0

  • Adds getDirectoryPaths method to the interface.

2.3.0

  • Replaces macUTIs with uniformTypeIdentifiers. macUTIs is available as an alias, but will be deprecated in a future release.

2.2.0

  • Makes XTypeGroup's constructor constant.

2.1.1

  • Updates imports for prefer_relative_imports.
  • Updates minimum Flutter version to 2.10.

2.1.0

  • Adds allowsAny to XTypeGroup as a simple and future-proof way of identifying wildcard groups.

2.0.4

  • Removes dependency on meta.

2.0.3

  • Minor code cleanup for new analysis rules.
  • Update to use the verify method introduced in plugin_platform_interface 2.1.0.

2.0.2

  • Update platform_plugin_interface version requirement.

2.0.1

  • Replace extensions with leading dots.

2.0.0

  • Migration to null-safety

1.0.3+1

1.0.3

  • Update Flutter SDK constraint.

1.0.2

  • Replace locally defined XFile types with the versions from the cross_file package.

1.0.1

  • Allow type groups that allow any file.

1.0.0

  • Initial release.

Installing

export PUB_HOSTED_URL=https://pub.mirror.p-hatan.ir
flutter pub add file_selector_platform_interface
pubspec.yaml
name: file_selector_platform_interface
description: A common platform interface for the file_selector plugin.
repository: https://github.com/flutter/packages/tree/main/packages/file_selector/file_selector_platform_interface
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+file_selector%22
# NOTE: We strongly prefer non-breaking changes, even at the expense of a
# less-clean API. See https://flutter.dev/go/platform-interface-breaking-changes
version: 2.7.0

environment:
  sdk: ^3.7.0
  flutter: ">=3.29.0"

dependencies:
  cross_file: ^0.3.0
  flutter:
    sdk: flutter
  http: ">=0.13.0 <2.0.0"
  plugin_platform_interface: ^2.1.7

dev_dependencies:
  flutter_test:
    sdk: flutter
  test: ^1.16.3

topics:
  - files
  - file-selection
  - file-selector

Version history

VersionPublishedArchiveSHA-256
1.0.0On demandDownload37f6a85e…5868eb
1.0.1On demandDownload037e2149…eb3fe0
1.0.2On demandDownload21365cb7…04c949
1.0.3+1On demandDownload6dd92164…72dc76
2.0.0-nullsafety.0On demandDownload69a7a64c…903331
2.0.0On demandDownload26eb5e54…4c378d
2.0.1On demandDownload5830add1…78ee51
2.0.2On demandDownload1d1d4ac5…8b9afa
2.0.3On demandDownload3322464e…f64ce0
2.0.4On demandDownload3bf26fbd…a19ffe
2.1.0On demandDownload92b92498…2dd9c3
2.1.1On demandDownloadb0b7e86c…7f8042
2.2.0On demandDownloadd3ec2dc7…3fea29
2.3.0On demandDownload432c4c72…453cc4
2.4.0On demandDownload17cdfe3d…34fc2c
2.4.1On demandDownload98b3f98e…00f54b
2.5.0On demandDownloadbf15ba69…a8148e
2.5.1On demandDownload2a7f4bbf…2abc0a
2.6.0On demandDownload412705a6…d3853c
2.6.1On demandDownload0aa47a72…de8262
2.6.2On demandDownloada3994c26…c3f66b
2.7.0Cached · Upstream SHA-256 matchedDownload35e0bd61…13dc85

Dependencies

cross_file "^0.3.0"

flutter { "sdk": "flutter" }

http "\u003e=0.13.0 \u003c2.0.0"

plugin_platform_interface "^2.1.7"