Skip to content
pubscout

dir_picker

0.8.0, released 2 weeks ago by v4g.space

Pick directories and list file system entries across Android, iOS, macOS, Windows, Linux, and Web.

WASM-ready
$ flutter pub add dir_picker
Source repository

What it does

A Flutter plugin providing native system dialogs for directory picking and file system entry listing. It supports streaming large directory trees and persisting access across app restarts via platform-specific features like bookmarks and URI permissions.

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

Use it when

  • You need users to pick directories using native system dialogs across desktop, mobile, and web.
  • You need to list or stream contents of picked directories recursively.
  • You need to maintain access to folders across app restarts using bookmarks or URI permissions.

Skip it when

  • You only need to pick individual files rather than directories.
  • Your target browser environment is Firefox or Safari on the web, which lack directory picker support.

Strengths

  • Cross-platform support including Android, iOS, macOS, Windows, Linux, and Web.
  • Supports directory listing and stream-based entry reading for large folders.
  • Persistent access handling for picked folders across app restarts.

Weaknesses

  • Web platform support is restricted to Chromium browsers (Chrome, Edge) supporting the File System Access API.
  • Requires platform-specific setup on macOS (entitlements).

Setup

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

Requires adding security-scoped bookmark entitlements to macOS Release and DebugProfile entitlements.

import 'package:dir_picker/dir_picker.dart';

final PickedLocation? location = await DirPicker.pick();
if (location != null) {
  final entries = await DirPicker.listEntries(location, recursive: true);
  for (final entry in entries) {
    print('${entry.relativePath}');
  }
}

Alternatives

Packages that do the same job and could replace dir_picker.

Works with

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