Skip to content
pubscout

file_selector

1.1.0, released 12 months ago by flutter.dev

Flutter plugin for opening, saving, and selecting directories with native file dialogs

WASM-ready
$ flutter pub add file_selector
Source repository

What it does

Provides APIs to open single or multiple files, get save locations, and pick directories across Android, iOS, macOS, Linux, Windows, and Web. It uses platform-specific implementations to show native file pickers.

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

Use it when

  • Need to let users pick files or directories in a Flutter app
  • Require cross-platform file selection without custom UI
  • Need to save files to user-selected locations

Skip it when

  • You only need to read/write files programmatically without user interaction
  • You need advanced file system monitoring or watching

Strengths

  • Cross-platform native dialogs
  • Supports filtering by extensions, MIME types, and UTIs
  • Offers directory selection and save location APIs
  • Regularly updated with SDK support changes

Weaknesses

  • No support for iOS <12 or Android <SDK21
  • Requires platform-specific entitlements on macOS
  • No built-in file watching or monitoring

Setup

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

Add platform-specific entitlements on macOS for read/write access; include plugin in pubspec; no build_runner needed

final XFile? file = await openFile(acceptedTypeGroups: [XTypeGroup(label: 'images', extensions: ['jpg','png'])]);

Alternatives

Packages that do the same job and could replace file_selector.

  • file_picker

    Provides similar file selection but with different API surface and may support more platforms

  • path_provider

    Useful for getting platform directories but does not provide file dialogs

Works with

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