Skip to content
pubscout

file_picker

13.4.0, released 4 days ago by victorcarreras.dev

Use the native file explorer to pick single or multiple files, directories, and save files.

WASM-ready
$ flutter pub add file_picker
Source repository

What it does

A federated Flutter plugin that opens the native OS file explorer to select single or multiple files, pick directories, or trigger save-file dialogs. It supports custom extension filtering, cloud files, and retrieving files as XFiles or reading their bytes directly.

AI-written summary of version 13.3.2, based on the package's README and metadata. Report an inaccuracy

Use it when

  • Your app needs to let users pick single or multiple files using native platform dialogs.
  • You need to allow users to select directories or save files to specific paths.
  • You require extension filtering for specific file types like images, videos, or custom formats.

Skip it when

  • You need an internal custom-designed UI asset browser rather than the OS native file explorer.
  • You are handling web-specific features where browser restrictions prevent accessing full filesystem details.

Strengths

  • Supports all major platforms including mobile, web, desktop, and WebAssembly.
  • Provides access to native file explorers and cloud storage integration.
  • Offers integration with cross_file for interoperability with other libraries.

Weaknesses

  • Web and mobile platform limitations apply regarding direct file path exposure and filesystem access.
  • Certain advanced options and dialog configurations require platform-specific option objects.

Setup

Kind
Plugin (native code)
Effort
Low
Code generation
No
Direct dependencies
7

Requires platform-specific configuration for certain features like macOS entitlements or Android recovery options as documented in the respective platform packages.

PlatformFile? file = await FilePicker.pickFile();

if (file != null) {
  print(file.name);
  print(await file.length());
} else {
  // User canceled the picker
}

Alternatives

Packages that do the same job and could replace file_picker.

Works with

Packages commonly used together with file_picker: ones it builds on, ones built on it, and its own family.