vicajilau/flutter_file_picker
71.6
Strong · 19 September 2026
6.9k
lines of production code
Dart
with Kotlin, Swift, C++
1
measurement over time
What this system is
This system is a federated Flutter plugin that provides cross-platform file and directory selection capabilities. It exposes a unified API for picking single or multiple files, selecting directories, and saving files, while delegating native implementation details to platform-specific packages for Android, iOS, macOS, Linux, Windows, and Web. The architecture ensures consistent behavior across environments by abstracting platform nuances, such as Android's Storage Access Framework or Linux's XDG Portal, behind a common interface.
How it got here
2018 — Federated architecture migration
16 changes.
The project was restructured into a federated Melos workspace, separating the core API from platform-specific implementations for Android, iOS, Linux, Windows, and Web. This period involved migrating native code to Kotlin and modernizing the iOS and Android example apps to support Flutter V2 embedding, Swift Package Manager, and updated build tooling.
2019–2026 — Federated plugin architecture migration
37 changes.
The project refactored the monolithic file\_picker into a federated architecture, extracting platform-specific implementations into separate packages for Android, Darwin, Linux, Windows, and Web. This period established a unified platform interface and updated all native implementations to modern standards, such as Swift for Apple platforms and XDG Portal for Linux. The work also included comprehensive updates to example applications, CI tooling, and test coverage to support the new modular structure.
Features
Add macOS example app
A new macOS example application (Runner) has been added, providing a complete native Xcode project structure for the file\_picker plugin. This includes the Swift application entry point, main window controller, and standard macOS UI assets like the app icon and main menu. The project is configured with specific bundle identifiers, entitlements for sandboxed file access, and build configurations to support both Debug and Release builds on macOS.
example/macos/Runner, example/macos/Runner.xcodeproj/project.xcworkspace · high confidence
Add macOS example app project
The macOS example application project file (Runner.xcodeproj) has been added, providing the necessary build configuration, source files (AppDelegate, MainFlutterWindow), and resources to run the example app on macOS.
example/macos/Runner.xcodeproj · high confidence
Added Xcode scheme for the macOS example app
The macOS example application now includes a configured Xcode scheme (Runner.xcscheme) that defines build, test, launch, and archive actions. This configuration includes a pre-action script to prepare the Flutter framework and enables GPU validation mode during debugging, allowing developers to run and test the macOS example directly within Xcode.
example/macos/Runner.xcodeproj/xcshareddata · high confidence
Added file\_picker usage example
A new example file has been added to the file\_picker package demonstrating how to pick a single file, pick multiple files with custom extension filters, and select a directory path.
_packages/file\picker/example · high confidence
Added macOS example app configuration files
The macOS example application now includes the necessary build configuration files (Flutter-Debug.xcconfig and Flutter-Release.xcconfig) which include the generated ephemeral configuration, enabling the example app to be built for macOS.
example/macos/Flutter · high confidence
Added macOS example app workspace configuration
The macOS example application now includes the necessary Xcode workspace files (contents.xcworkspacedata and IDEWorkspaceChecks.plist) to properly configure the project environment for development and building on macOS.
example/macos/Runner.xcworkspace · high confidence
Added platform-specific file save utilities
Introduced new utility classes for saving bytes to files, with a concrete implementation for the IO platform that uses isolates for background processing, and a stub for the Web platform that throws an unsupported error.
_packages/file\_picker\_platform\interface/lib/src/utils · high confidence
Android file picker implementation extracted to new package
The Android-specific file picking logic has been extracted into a new \file\_picker\_android\ package, introducing the \FilePickerAndroid\ platform implementation and \AndroidPlatformFile\ class. This change adds support for configuring Android Storage Access Framework (SAF) permissions via \FilePickerAndroidOptions\ and \AndroidSAFOptions\, allowing users to control grant types (transient or lifetime) and access modes (read-only or read-write). The implementation also exposes the \AndroidSAFHandle\ to manage URI grants and provides file size information through the \lengthSync()\ method.
_packages/file\_picker\android/lib/src · high confidence
Darwin file picker rewritten with Swift and modern APIs
The native implementation for iOS and macOS has been rewritten in Swift, replacing the previous Objective-C code. On iOS, the picker now uses PHPickerViewController for photos and the standard UIDocumentPicker for files, supporting configurable asset representation modes. On macOS, the plugin uses NSOpenPanel with improved handling of bundle-like directories, configurable accept labels, and background-threaded entitlement checks to prevent UI freezes. A PrivacyInfo.xcprivacy manifest is now included to comply with Apple's data usage requirements.
_packages/file\_picker\darwin/darwin · high confidence
Introduce Linux file picker implementation via XDG Desktop Portal
This change adds the \file\_picker\_linux\ package, providing the Linux-specific implementation for the federated file\_picker plugin. It replaces previous Linux support by using the XDG Desktop Portal (via D-Bus) to handle file and directory selection, supporting features such as custom file filters, multiple file selection, and configurable dialog options like \acceptLabel\ and \parentWindow\. The implementation includes dedicated classes for Linux platform files (\LinuxPlatformFile\) and portal interactions (\xdp\_filechooser.dart\, \xdp\_request.dart\), ensuring consistent behavior with the cross-platform interface while leveraging native Linux desktop standards.
_packages/file\_picker\linux/lib/src · high confidence
Introduce dedicated Darwin platform implementation for iOS and macOS
This change extracts a new \file\_picker\_darwin\ package that provides the native implementation for Apple platforms, replacing the previous monolithic structure. It introduces \DarwinPlatformFile\ to handle file metadata (name, URI, size) and implements the \FilePickerPlatform\ interface to manage file and directory selection dialogs via method channels. The implementation supports configurable options such as asset representation mode and custom accept labels, and includes logic to skip macOS App Sandbox entitlement checks for non-sandboxed apps, ensuring correct behavior on both iOS and macOS.
_packages/file\_picker\darwin/lib/src · high confidence
Introduce federated web implementation for file\_picker
The \file\_picker\ plugin now includes a dedicated \file\_picker\_web\ package that implements the platform interface for web environments. This new implementation uses standard HTML5 file input interop to handle single and multiple file picking, as well as file saving. It introduces \FilePickerWebOptions\ to allow users to configure whether to load file bytes into memory (\withData\), use read streams (\withReadStream\), process files sequentially (\readSequential\), or cancel uploads when the window loses focus (\cancelUploadOnWindowBlur\). The web platform explicitly throws an \UnsupportedError\ for directory picking, and the implementation ensures proper cleanup of DOM event listeners and input elements after file selection or cancellation.
_packages/file\_picker\web/lib · high confidence
Introduces federated platform interface with new file selection and saving capabilities
The \file\_picker\_platform\_interface\ package now provides the core abstraction for the federated plugin architecture, introducing a new \FilePickerPlatform\ interface that defines methods for picking single or multiple files (\pickFile\, \pickFiles\), picking directories (\getDirectoryPath\), and saving files (\saveFile\). This update adds a new \PlatformFile\ class to represent selected files, exposing properties like name, extension, URI, and size, along with methods to read file content. It also introduces \FileType\ and \FilePickerStatus\ enums to filter file types and track picker state, and includes a \MethodChannelFilePicker\ implementation to bridge these calls to native platforms.
_packages/file\_picker\_platform\interface/lib/src · high confidence
New file\_picker\_linux package for Linux platform support
A new \file\_picker\_linux\ package has been introduced to provide the Linux-specific implementation for the file\_picker plugin. This package exports the core Linux file picker logic, configuration options, file filters, and platform-specific file data structures, enabling the plugin to function on Linux desktop environments.
_packages/file\_picker\linux/lib · high confidence
New tooling to fetch Flutter versions and patch Android example for CI compatibility testing
Added \tool/fetch\_versions.dart\ to retrieve recent stable Flutter minor versions from the release feed (falling back to 'stable' and 'beta' on failure) and \tool/flutter\_release.dart\ to parse release data. Also introduced \tool/patch\_android\_example.dart\, which updates the example Android app's AGP, Gradle, and Kotlin versions to allow CI lanes to test specific toolchain combinations and catch compatibility regressions.
tool · high confidence
Web example now supports PWA installation and standard web metadata
The web example now includes an index.html entry point and a manifest.json file, enabling Progressive Web App (PWA) capabilities such as home-screen installation, custom icons, and theme colors. This change ensures the example app behaves like a standard web application with proper metadata for browsers and mobile devices.
example/web · high confidence
Removals
Removal of legacy FilePicker stub implementation
The legacy \FilePicker\ class in \lib/file\_picker.dart\, which previously relied on a hardcoded \MethodChannel\ to invoke a 'pickPDF' action, has been removed. This deletion eliminates the outdated, single-purpose stub in favor of the plugin's unified, platform-specific architecture that supports multiple file types and modern embedding standards.
lib · high confidence
Removal of legacy iOS FilePickerPlugin implementation
The legacy iOS implementation files (FilePickerPlugin.h and .m) have been removed from the plugin. This deletion eliminates the previous single-file, PDF-only document picker logic that relied on UIDocumentPickerViewController and a static method channel, indicating a structural shift in how the iOS file picking capability is now handled within the plugin.
ios/Classes · high confidence
Architecture
Android platform implementation extracted to new federated package
The Android native code for file\_picker has been extracted into a new federated plugin package (packages/file\_picker\_android/android). This change introduces the core Kotlin implementation (FilePickerPlugin, FileUtils, MethodResultWrapper) and an AndroidManifest with required \<queries\> for file intents, establishing the standalone Android platform channel. It also includes a proguard-rules.pro file for code shrinking configuration.
_packages/file\_picker\android/android · high confidence
Repository restructured into a federated Melos workspace with updated documentation and licensing
The project has been reorganized into a federated plugin architecture managed by Melos, separating the cross-platform Dart API into \file\_picker\ and platform-specific implementations (Android, Darwin, Linux, Windows, Web) into independent packages. This change includes the addition of a comprehensive \README.md\ with usage examples and migration guides, a \CONTRIBUTING.md\ detailing the new release and testing workflow, and a \SECURITY.md\ for vulnerability reporting. The repository license has been updated from a placeholder to the MIT License, and legacy IDE metadata files (\.iml\) have been removed.
(repo-wide) · high confidence
Behavioural changes
Android implementation migrated to Kotlin with modern plugin architecture
The Android native code for the file picker has been rewritten from Java to Kotlin, replacing the legacy \FilePickerPlugin\ with a new \FilePickerDelegate\ and \FileInfo\ model. This change introduces a builder pattern for file information and updates the result handling to return structured maps (including path, name, size, URI, and SAF handle) instead of raw paths, aligning the Android module with the modern Flutter plugin binding standards.
android · high confidence
Consolidated Android implementation exports
The Android-specific exports for the file\_picker plugin are now centralized in a single entry point, android\_file\_picker.dart. Users importing the Android implementation should use this new file to access the platform file, SAF handle, main picker class, and options, simplifying the import structure for Android-only usage.
_packages/file\_picker\android/lib · high confidence
Example app UI refactored to use dedicated demo component
The example application's main entry point has been simplified by replacing the inline, monolithic stateful widget with a dedicated \FilePickerDemo\ component. This change removes the direct implementation of the file picker logic and UI from \main.dart\, consolidating the demo experience into a separate module for better organization and maintainability.
example/lib · high confidence
Example app regenerated with updated Flutter configuration and metadata
The example application has been regenerated to align with the current Flutter stable channel, switching the project type to 'app' and updating the underlying metadata. This regeneration includes the addition of a new analysis\_options.yaml file to enforce standard Flutter lints while excluding platform-specific build folders, and the removal of legacy IntelliJ module files (.iml) that are no longer required. The .gitignore has been expanded to track Swift Package Manager artifacts, Gradle daemon properties, and Android Studio build outputs, while the README has been updated to reflect the standard Flutter project structure.
example · high confidence
Extracted Darwin implementation into a separate package
The iOS and macOS file picking logic has been moved into a new standalone package, \file\_picker\_darwin\. This change separates the platform-specific implementation from the main plugin, allowing for independent management and usage of the Darwin file picker functionality.
_packages/file\_picker\darwin/lib · high confidence
File picker package relocated and facade exposed
The main file\_picker package has been reorganized into the packages/file\_picker directory, with the primary entry point now exporting the platform interface and the internal implementation. This change establishes a cleaner facade for the library, ensuring that the public API remains consistent while the underlying structure supports platform-specific implementations more effectively.
_packages/file\picker/lib · high confidence
Introduce dedicated Windows implementation using modern Win32 dialogs
This change adds a new, standalone \file\_picker\_windows\ package that replaces the previous Windows-specific code with a modern implementation using \IFileOpenDialog\ and \IFileSaveDialog\ via the \win32\ FFI bindings. For users, this brings improved reliability and support for modern Windows features, including the ability to customize the dialog's confirm button text via the new \acceptLabel\ option, better handling of initial directories, and a safer file size API where \PlatformFile.size\ is replaced by \lengthSync()\ and \length()\. The implementation runs dialog prompts in background isolates to prevent UI freezing and registers itself automatically as the Windows platform provider.
_packages/file\_picker\windows/lib/src · high confidence
Introduces platform-specific file picker options for Android, iOS/macOS, Linux, Windows, and Web
The file picker now exposes dedicated configuration classes for each platform, allowing users to tailor the dialog behavior. On Apple platforms, you can control media asset representation via \DarwinAssetRepresentationMode\ and customize the confirm button text with \acceptLabel\. Linux and Windows users can now set a custom label for the accept/confirm button and, on desktops, lock the parent window modally using the shared \DesktopWindowOptions\ base. Android and Web platforms receive stub options classes for future extensibility, establishing a federated options structure across the library.
_packages/file\_picker\_platform\_interface/lib/src/file\_picker\options · high confidence
Linux file picker example demonstrates parent window locking
The example application for the Linux file picker package has been updated to show how to lock the file dialog to the parent application window. It includes a helper function that uses \xdotool\ to resolve the X window ID for the current process, allowing the \lockParentWindow\ option to function correctly by providing the necessary \parentWindow\ identifier to the XDG portal.
_packages/file\_picker\linux/example · high confidence
Migrate Android example to Flutter V2 embedding and Kotlin
The Android example app has been updated to use the Flutter V2 Android embedding, requiring a migration from Java to Kotlin for the MainActivity and the adoption of the new Android Gradle plugin namespace configuration. This change updates the AndroidManifest.xml to declare the activity as exported, configures NormalTheme for proper dark mode support, and removes deprecated initialization code, ensuring the example app is compatible with modern Flutter versions and Android 12+ requirements.
example/android · high confidence
Migrates iOS example app to Swift Package Manager and modern Xcode project structure
The iOS example app has been updated to use Swift Package Manager for plugin dependencies, replacing the previous CocoaPods-based setup. This change removes references to \Flutter.framework\, \App.framework\, and \libPods-Runner.a\ from the build phases, introducing \FlutterGeneratedPluginSwiftPackage\ instead. The project file has also been upgraded to Xcode object version 60, updated the development region to English, and added a bridging header for Swift interoperability.
example/ios/Runner.xcodeproj · high confidence
Redesigned file picker demo with Material 3 and SAF support
The example application has been completely redesigned to use Material 3 and now includes dedicated UI components for displaying picked files and directories. It introduces support for Android's Storage Access Framework (SAF), allowing users to pick directories with persistable URI grants and manage file permissions directly within the demo. The interface also adds configuration fields for custom dialog titles, parent window locking, accept labels, and file extensions, providing a more comprehensive testing ground for the plugin's cross-platform options.
example/lib/src · high confidence
Removes CocoaPods dependency and minimum iOS version requirement for the example app
The example app configuration has been updated to no longer rely on CocoaPods for dependency management, with the Debug and Release xcconfig files now including only the generated configuration instead of the Pods support files. Additionally, the explicit minimum iOS version requirement (previously set to 8.0) has been removed from the AppFrameworkInfo.plist, allowing the system to determine the deployment target based on other project settings.
example/ios/Flutter · high confidence
Removes CocoaPods dependency from iOS workspace
The iOS example app workspace no longer references the CocoaPods project (Pods.xcodeproj), indicating a shift away from CocoaPods for dependency management. Additionally, a new workspace settings file is introduced that explicitly disables Xcode Previews, which may affect the development experience by requiring manual rebuilding rather than live preview updates.
example/ios/Runner.xcworkspace · high confidence
Renamed Windows file picker package to windows\_file\_picker
The Windows implementation of the file\_picker plugin has been renamed from file\_picker\_windows to windows\_file\_picker. This change updates the package name in pubspec.yaml and adjusts the library export structure in windows\_file\_picker.dart to reflect the new identifier, ensuring consistent naming across the codebase while maintaining the same underlying functionality for selecting files on Windows.
_packages/file\_picker\windows/lib · high confidence
Stabilize public API surface with explicit platform interface exports
The \file\_picker\_platform\_interface\ package now exposes a consolidated barrel file that explicitly re-exports the core platform interface, platform-specific options (Android, Darwin, Linux, Web, Windows), enums, exceptions, and conditional save utilities. This change ensures that consumers of the platform interface have a stable, predictable entry point for accessing these foundational types, supporting the federated architecture by clearly defining the contract between the main plugin and its platform implementations.
_packages/file\_picker\_platform\interface/lib · high confidence
Updated iOS Xcode scheme for Flutter tooling and debugging
The example app's Xcode scheme has been updated to align with Xcode 15.10, replacing the generic language setting with a specific LLDB initialization file for Flutter debugging. A pre-build shell script action has been added to prepare the Flutter framework, and GPU validation mode is now enabled during launch to assist with graphics debugging.
example/ios/Runner.xcodeproj/xcshareddata · high confidence
Updated iOS example app configuration and entry point
The iOS example app has been updated to support modern iOS requirements and file access features. The AppDelegate now implements FlutterImplicitEngineDelegate to handle implicit engine initialization, and a bridging header has been added for plugin registration. Info.plist now includes CADisableMinimumFrameDurationOnPhone and UIApplicationSupportsIndirectInputEvents for better performance and Apple Pencil support, adds usage descriptions for photo library and Apple Music access, configures scene management with a custom scene delegate, and enables background modes for fetch and remote notifications.
example/ios/Runner · high confidence
iOS workspace configuration updated
The iOS example project's workspace settings have been updated to disable SwiftUI Previews and to reference the project location as 'self' instead of a group path, ensuring the workspace is correctly configured for the current project structure.
example/ios/Runner.xcodeproj/project.xcworkspace · high confidence
Fixes
Regenerate Linux example app build files
The Linux example application's build configuration and source files have been regenerated to align with the current Flutter tooling. This update refreshes the CMake build scripts, including the main project configuration and Flutter-specific build steps, and regenerates the plugin registrant files to ensure correct plugin integration. It also updates the native C++ entry point and application implementation to match the standard GTK-based Linux desktop template.
example/linux · high confidence
Regenerate Windows example app files
The Windows runner files for the example app have been regenerated to align with the latest Flutter tooling. This update includes a fix in the Flutter CMake configuration to set a fallback target platform (windows-x64) for older Flutter versions, and ensures the window redraws correctly on creation by forcing a redraw in the window creation callback. The generated plugin registrant is now empty, reflecting the current plugin state, and build/install configurations have been updated to support modern CMake behaviors and proper asset bundling.
example/windows · high confidence
Test coverage
Added macOS unit test scaffold for the plugin; Added tests for facade constraints, version fetching, and Android example patching; Added tests for multi-pick mode behavior in the example app; Added tests for platform interface, Darwin options, and PlatformFile; Added unit tests for FilePicker delegation and Darwin options; Added unit tests for file\_picker\_web package; Added unit tests for the Darwin file picker implementation; Added web integration test driver with file chooser interception; Added web integration test for file picking.
Dependencies
Migrate to federated plugin architecture and Dart 3.10/Flutter 3.38 minimums
The file\_picker plugin has been restructured into a federated architecture, splitting platform-specific implementations into dedicated packages (android\_file\_picker, file\_picker\_darwin, file\_picker\_linux, windows\_file\_picker, file\_picker\_web) and raising the minimum supported Dart version to 3.10.0 and Flutter to 3.38.0. The main file\_picker package now acts as a facade that delegates to these sub-packages, and the example app has been updated to use the new federated dependencies and workspace configuration.
(dependencies) · high confidence
Upgrade Gradle wrapper to version 9.5.0
The Android example project now uses Gradle 9.5.0 for builds, replacing the previous version 4.4. This ensures the example environment stays compatible with modern Android development tooling and build requirements.
example/android/gradle · high confidence
Housekeeping
Added minimal example files to subpackages for improved documentation scores
Minimal example files have been added to the example directories of the file\_picker subpackages (android, darwin, platform\_interface, web, and windows). These examples demonstrate basic usage and registration of the respective platform implementations, helping to achieve a 10/10 Pana example score.
(repo-wide) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Baseline
- First survey — no prior run to compare against. CAI 72.
Lenses
- Code Health 96
- Architecture 89
- Maturity 62
- Readiness 74
- Security 77
- Domain Modelling 100
Changes since last survey
- 300 commits — 220 feature/other, 80 fixes
By area
- (repo) — 108 commits
- packages/file_picker_darwin — 28 commits
- (root) — 26 commits
- packages/file_picker_android — 26 commits
- packages/file_picker — 21 commits
- .github/workflows — 18 commits
- packages/file_picker_linux — 12 commits
- lib/src — 11 commits
- example/lib — 9 commits
- packages/file_picker_platform_interface — 9 commits
- packages/file_picker_web — 8 commits
- packages/file_picker_windows — 8 commits
- example/test_driver — 3 commits
- tool/patch_android_example.dart — 2 commits
- .github/ISSUE_TEMPLATE — 1 commit
- .github/assets — 1 commit
- .github/dependabot.yml — 1 commit
- android/src — 1 commit
- example/analysis_options.yaml — 1 commit
- example/integration_test — 1 commit
Notable commits
- fix: Fix FilePickerWebOptions.readSequential having no effect
- fix: Fix allowedExtensions being discarded entirely on Android when one extension has no known mime type
- fix: Fix window focus listener never being removed on web
- fix: Merge branch 'main' into fix/web-read-sequential-noop
- fix: Merge branch 'main' into fix/web-read-sequential-noop
- fix: Merge branch 'master' into fix/android-restore-buildscript-classpath
- fix: Merge branch 'master' into fix/android-restore-buildscript-classpath
- fix: Merge branch 'master' into fix/darwin-macos-savefile-bytes
- fix: Merge branch 'master' into fix/darwin-pick-file-and-directory-paths
- fix: Merge branch 'master' into fix/facade-implementation-constraints
- fix: Merge branch 'master' into fix/facade-wasm-compat
- fix: Merge branch 'master' into fix/publish-workflow-concurrency-scope
- fix: Merge branch 'master' into fix/publish-workflow-pat-and-example-tag
- fix: Merge pull request #2104 from ryanaidilp/fix/2101-remove-tika-android
- fix: Merge pull request #2105 from ryanaidilp/fix/2101-remove-tika-file-picker-android
- fix: Merge pull request #2109 from miguelpruivo/fix/platform-implementations
- fix: Merge pull request #2122 from miguelpruivo/chore/revert-material-ui-example-migration
- fix: Merge pull request #2129 from miguelpruivo/fix/darwin-macos-event-channel
- fix: Merge pull request #2133 from AzazelSensei/fix-2130-relax-linux-dbus
- fix: Merge pull request #2134 from miguelpruivo/fix/darwin-macos-savefile-bytes
- …and 280 more
Architecture
- 0 containers · 1 bounded contexts · 0 dependency edges (baseline)
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
vicajilau/flutter_file_picker was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 19 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit c44057cbb520e5f2a2a9f1f037adbcb25656665e — the exact code this score is about.
- Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-13a154b7f5d1.