unified_file_picker library

Cross-platform file and folder picker with a unified, customizable Flutter UI.

unified_file_picker renders one consistent explorer-style interface on Android, iOS, Windows, Linux, and macOS. Instead of relying on each platform's native dialog, the package provides a fully themeable Flutter experience with list/details/tiles/icons views, recursive search, keyboard shortcuts, and RTL support.

Published by quds.cc.

Getting started

Register the localization delegate in your app:

MaterialApp(
  localizationsDelegates: const [
    UnifiedFilePickerLocalizations.delegate,
    GlobalMaterialLocalizations.delegate,
    GlobalWidgetsLocalizations.delegate,
    GlobalCupertinoLocalizations.delegate,
  ],
  supportedLocales: const [Locale('en'), Locale('ar')],
);

Pick files with the convenience API:

final files = await UnifiedFilePicker.pickFiles(
  context,
  type: FilePickerType.images,
  selection: SelectionMode.multiple,
);

For full control over theme, strings, transitions, and layout, use UnifiedFilePicker.pick with FilePickerOptions:

final result = await UnifiedFilePicker.pick(
  context,
  options: FilePickerOptions(
    theme: FilePickerTheme(title: 'Choose files'),
    initialViewMode: FilePickerViewMode.tiles,
  ),
);

Customization overview

Concern Type
Colors, typography, modal chrome FilePickerTheme
Session behavior and filters FilePickerOptions
UI copy and localization UnifiedFilePickerStrings
Modal vs fullscreen, animations FilePickerPresentation, FilePickerTransition
Explorer layouts FilePickerViewMode

Return values

All pick methods return null when the user cancels. Otherwise they return a non-empty List of PickedFile items. UnifiedFilePicker.saveFile returns a single PickedFile or null.

See also:

Classes

ArabicFilePickerStrings
Arabic (ar) UI strings with RTL-friendly copy.
EnglishFilePickerStrings
English (en) UI strings.
FileEntry
A file or folder row shown in the picker browser.
FileFilterCriteria
Resolved filter rules applied by the UI and platform backends.
FilePickerOptions
Immutable configuration for a single picker session.
FilePickerOptionsFactory
Factory methods that build FilePickerOptions for common workflows.
FilePickerScreen
The root picker widget; embeddable in custom navigation or tests.
FilePickerTheme
Visual and structural styling for the unified picker UI.
FilePickerTransition
Timing and easing for picker enter/exit transitions.
FilePickerVirtualRoots
Virtual directory identifiers shared with native backends.
FileTypeFilter
A user-defined or preset group of allowed file types.
PickedFile
A file or folder chosen by the user.
SaveFileHelper
Cross-platform helpers for persisting data after UnifiedFilePicker.saveFile.
UnifiedFilePicker
Primary entry point for opening, saving, and customizing the unified picker.
UnifiedFilePickerLocalizations
Provides UnifiedFilePickerStrings from the widget tree.
UnifiedFilePickerStrings
Contract for all user-visible picker strings.

Enums

FileEntryKind
Semantic category used for icons, localization, and OS-specific shortcuts.
FilePickerMode
High-level purpose of a picker session.
FilePickerPresentation
How the picker surface is presented above the host application.
FilePickerTransitionKind
Animation style used when presenting or dismissing the picker.
FilePickerType
Preset categories of files exposed by the picker.
FilePickerViewMode
Explorer-style layouts for folder contents.
SelectionMode
Whether the user may select one or many items.

Extensions

FileEntryKindParsing on FileEntryKind
Serialization and shortcut detection for FileEntryKind.
FilePickerModeExtensions on FilePickerMode
Convenience labels and capability flags for FilePickerMode.
FilePickerThemeCopy on FilePickerTheme
Convenience copyWith for FilePickerTheme.
FilePickerTypeExtensions on FilePickerType
Labels and extension sets for FilePickerType.
FilePickerViewModeUi on FilePickerViewMode
UI helpers for FilePickerViewMode.
SelectionModeExtensions on SelectionMode
Helpers for SelectionMode.

Functions

kindForEntry({required bool isDirectory, String? kindKey, String? path}) FileEntryKind
Infers FileEntryKind from entry metadata.
kindForExtension(String extension) FileEntryKind
Infers FileEntryKind from a file extension string (including dot).
showUnifiedFilePicker(BuildContext context, {FilePickerOptions options = const FilePickerOptions()}) Future<List<PickedFile>?>
Presents the picker using FilePickerOptions.presentation.
showUnifiedFilePickerModal(BuildContext context, {required FilePickerOptions options}) Future<List<PickedFile>?>
Presents FilePickerScreen inside a centered modal dialog.
showUnifiedFilePickerRoute(BuildContext context, {required FilePickerOptions options}) Future<List<PickedFile>?>
Pushes FilePickerScreen as a fullscreen dialog route.