{"id":32290320,"url":"https://github.com/philenius/flutter_file_picker_desktop","last_synced_at":"2025-10-23T02:49:53.995Z","repository":{"id":46759450,"uuid":"384999468","full_name":"philenius/flutter_file_picker_desktop","owner":"philenius","description":"A package that allows you to use a native file explorer on Windows, macOS, and Linux to pick a directory or one or multiple files, with extension filtering support.","archived":false,"fork":false,"pushed_at":"2025-04-23T23:29:55.000Z","size":4802,"stargazers_count":11,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-23T02:49:41.991Z","etag":null,"topics":["dart","flutter","linux","macos","windows"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/file_picker_desktop","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/philenius.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-07-11T16:32:35.000Z","updated_at":"2025-04-23T23:25:52.000Z","dependencies_parsed_at":"2022-09-06T02:11:06.902Z","dependency_job_id":null,"html_url":"https://github.com/philenius/flutter_file_picker_desktop","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/philenius/flutter_file_picker_desktop","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philenius%2Fflutter_file_picker_desktop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philenius%2Fflutter_file_picker_desktop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philenius%2Fflutter_file_picker_desktop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philenius%2Fflutter_file_picker_desktop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/philenius","download_url":"https://codeload.github.com/philenius/flutter_file_picker_desktop/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philenius%2Fflutter_file_picker_desktop/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280551629,"owners_count":26349596,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-23T02:00:06.710Z","response_time":142,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dart","flutter","linux","macos","windows"],"created_at":"2025-10-23T02:49:52.515Z","updated_at":"2025-10-23T02:49:53.987Z","avatar_url":"https://github.com/philenius.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# File Picker Desktop\n\n\u003ca href=\"https://github.com/philenius/flutter_file_picker_desktop/actions/workflows/main.yml\"\u003e\u003cimg alt=\"CI Pipeline\" src=\"https://github.com/philenius/flutter_file_picker_desktop/actions/workflows/main.yml/badge.svg\"\u003e\u003c/a\u003e \u003ca href=\"https://pub.dev/packages/file_picker_desktop\"\u003e\u003cimg src=\"https://img.shields.io/pub/v/file_picker_desktop\"\u003e\u003c/a\u003e \u003ca href=\"https://github.com/philenius/flutter_file_picker_desktop/issues\"\u003e\u003cimg src=\"https://img.shields.io/github/issues/philenius/flutter_file_picker_desktop\"\u003e\u003c/a\u003e \u003cimg src=\"https://img.shields.io/github/license/philenius/flutter_file_picker_desktop\"\u003e\n\nThis repository contains a Dart package that allows you to use a native file explorer on Windows, macOS, and Linux for three things:\n\n* picking files\n* picking directories\n* saving files\n\n\n\n\n\u003e # :warning: **PLEASE NOTE:**\n\u003e\n\u003e This Dart package has been archived in favor of _file_picker_ by Miguel Pruivo ([github.com/miguelpruivo/flutter_file_picker](https://github.com/miguelpruivo/flutter_file_picker)). All code of this repository has been integrated into Miguel's package. I recommend you to use his package, as I will only provide bug fixes, but will not add any additional features. Starting from version _4.0.0_ Miguel's package can be used without Go/Go Flutter, too. Thank you.\n\n\n\n\n## Features\n\n* :tada: This package **does not require** [Go Flutter](https://github.com/go-flutter-desktop/go-flutter). This package is written entirely in Dart!!! No dependencies on Go or Go Flutter.\n* :floppy_disk: Simple API for picking a single file or multiple files with support for filtering the allowed file extensions.\n* :file_folder: Simple API for picking a directory.\n* :cd: Simple API for saving a file.\n* :wrench: Different filtering options for file types included (+ customizable).\n* :tada: Customizable title of the dialog.\n* :robot: Runs on Linux, macOS, and Windows.\n\n\n\n**:warning: This package does not support Android, iOS, or the web. Please refer to Miguel Pruivo's package [github.com/miguelpruivo/flutter_file_picker](https://github.com/miguelpruivo/flutter_file_picker/) which offers the same functionality for Android, iOS, and the web. I tried my best to provide the same API as Miguel's package.**\n\n\nThe following screenshots show the file picker dialog on Linux, macOS, and Windows:\n\n\n| Linux File Picker                                            | Linux Directory Picker                                       | Linux Save File Dialog                                       |\n| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ |\n| ![Select file on Linux](screenshots/screenshotLinuxPickFiles.png) | ![Select directory on Linux](screenshots/screenshotLinuxPickDirectory.png) | ![Save file on Linux](screenshots/screenshotLinuxSaveFile.png) |\n| **macOS File Picker**                                        | **macOS Directory Picker**                                   | **macOS Save File Dialog**                                   |\n| ![Select file on macOS](screenshots/screenshotMacOSFile.png) | ![Select directory on macOS](screenshots/screenshotMacOSDirectory.png) | ![Save file on macOS](screenshots/screenshotMacOsSaveFile.png) |\n| **Windows**                                                  | **Windows Directory Picker**                                 | **Windows Save File Dialog**                                 |\n| ![Select file on Windows](screenshots/screenshotWindowsPickFiles.png) | ![Select directory on Windows](screenshots/screenshotWindowsPickDirectory.png) | ![Save file on Windows](screenshots/screenshotWindowsSaveFile.png) |\n\n\n\n## Usage\n\n### Add package to `pubspec.yaml`:\n\n```yaml\n\ndependencies:\n  file_picker_desktop: ^1.1.1\n\n```\n\n### Import:\n\n```dart\nimport 'package:file_picker_desktop/file_picker_desktop.dart';\n```\n\n### Dialog for picking a single File:\n\n```dart\ntry {\n  final result = await pickFiles(\n    allowMultiple: false,\n  );\n  if (result != null) {\n    File file = File(result.files.single.path);\n  } else {\n    // User canceled the picker\n  }\n} catch (e) {\n  print(e);\n}\n```\n\n### Dialog for picking multiple files:\n\n```dart\ntry {\n  final result = await pickFiles(\n    allowMultiple: true,\n  );\n  if (result != null) {\n    List\u003cFile\u003e files = result.paths\n        .where((path) =\u003e path != null)\n        .map((path) =\u003e File(path!))\n        .toList();\n  } else {\n    // User canceled the picker\n  }\n} catch (e) {\n  print(e);\n}\n```\n\n### Dialog for picking multiple files with extension filter:\n\n```dart\nfinal result = await pickFiles(\n  allowMultiple: true,\n  type: FileType.custom,\n  allowedExtensions: ['jpg', 'pdf', 'doc'],\n);\n```\n\n### Load the results and file details:\n\n```dart\nFilePickerResult? result = await pickFiles();\n\nif (result != null) {\n  PlatformFile file = result.files.first;\n\n  print(file.name);\n  print(file.bytes);\n  print(file.size);\n  print(file.extension);\n  print(file.path);\n} else {\n  // User canceled the picker\n}\n```\n\n### Dialog for picking a directory:\n\n```dart\ntry {\n  final selectedDirectory = await getDirectoryPath();\n  if (selectedDirectory != null) {\n    File directory = File(selectedDirectory);\n  } else {\n    // User canceled the picker\n  }\n} catch (e) {\n  print(e);\n}\n```\n\n### Dialog for saving a file:\n\n```dart\ntry {\n  final String? selectedFileName = await saveFile(\n    defaultFileName: 'default-file.txt',\n  );\n\n  if (selectedFileName != null) {\n  \tFile file = File(selectedFileName);\n  } else {\n    // User canceled the picker\n  }\n} catch (e) {\n    print(e);\n}\n```\n\n\n\n\n\n## Example Flutter App\n\n![Demo Flutter App](screenshots/screenshotDemoApp.png)\n\nThe directory `./example/` contains an example Flutter app which showcases the file picker's functionality. You can run this example app the following way:\n\n```bash\ncd ./example/\n\nflutter create .\n\n# Choose the appropriate option depending on your OS\nflutter config --enable-linux-desktop\nflutter config --enable-macos-desktop\nflutter config --enable-windows-desktop\n\nflutter run\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphilenius%2Fflutter_file_picker_desktop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphilenius%2Fflutter_file_picker_desktop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphilenius%2Fflutter_file_picker_desktop/lists"}