Skip to content
pubscout

file_selector_macos

0.9.5+2, released 5 weeks ago by flutter.dev

macOS implementation of the file_selector plugin

WASM-ready
$ flutter pub add file_selector_macos
Source repository

What it does

Provides APIs to pick files, directories, and save locations on macOS. It implements the platform interface required by file_selector.

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

Use it when

  • Need to select files or directories on macOS
  • Need to save a file location on macOS
  • Using file_selector in a Flutter app targeting macOS

Skip it when

  • Using only iOS or Android platforms
  • You already have a custom native implementation

Strengths

  • Native macOS integration
  • Supports entitlements for read/write access
  • Keeps up with latest Flutter SDKs
  • No extra pubspec dependency needed when using file_selector

Weaknesses

  • Only works on macOS
  • Requires adding entitlements to the app bundle
  • No support for other platforms

Setup

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

Add the entitlement for read-only or read/write access in the macOS project’s Info.plist. No build_runner or codegen required.

import 'package:file_selector/file_selector.dart';

Future<void> pickFile() async {
  final XFile? file = await openFile();
  if (file != null) {
    print('Picked file: ${file.path}');
  }
}

Alternatives

Packages that do the same job and could replace file_selector_macos.

Works with

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