{"id":31065397,"url":"https://github.com/devsonflutter/file_manager","last_synced_at":"2025-09-15T16:00:26.245Z","repository":{"id":37702787,"uuid":"380669200","full_name":"DevsOnFlutter/file_manager","owner":"DevsOnFlutter","description":"FileManager is a wonderful widget that allows you to manage files and folders, pick files and folders, and do a lot more. Designed to feel like part of the Flutter framework.","archived":false,"fork":false,"pushed_at":"2024-07-29T17:02:04.000Z","size":325,"stargazers_count":61,"open_issues_count":15,"forks_count":18,"subscribers_count":0,"default_branch":"main","last_synced_at":"2024-08-23T22:55:17.691Z","etag":null,"topics":["dart","file-manager","flutter","flutter-package","hacktoberfest","hacktoberfest2021","widget"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/file_manager","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DevsOnFlutter.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":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-06-27T06:36:42.000Z","updated_at":"2024-08-22T06:19:05.000Z","dependencies_parsed_at":"2024-06-19T17:38:33.352Z","dependency_job_id":"8300aac5-32e4-485b-b4c0-10ea7be7f9a6","html_url":"https://github.com/DevsOnFlutter/file_manager","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/DevsOnFlutter/file_manager","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevsOnFlutter%2Ffile_manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevsOnFlutter%2Ffile_manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevsOnFlutter%2Ffile_manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevsOnFlutter%2Ffile_manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DevsOnFlutter","download_url":"https://codeload.github.com/DevsOnFlutter/file_manager/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevsOnFlutter%2Ffile_manager/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275281918,"owners_count":25437090,"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-09-15T02:00:09.272Z","response_time":75,"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","file-manager","flutter","flutter-package","hacktoberfest","hacktoberfest2021","widget"],"created_at":"2025-09-15T16:00:20.619Z","updated_at":"2025-09-15T16:00:26.184Z","avatar_url":"https://github.com/DevsOnFlutter.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# File Manager\n\n![FileManager-Banner](https://i.imgur.com/NNaUK60.png)\n\n![GitHub](https://img.shields.io/github/license/DevsOnFlutter/file_manager?style=plastic) ![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/DevsOnFlutter/file_manager?style=plastic) ![GitHub top language](https://img.shields.io/github/languages/top/DevsOnFlutter/file_manager?style=plastic) ![GitHub language count](https://img.shields.io/github/languages/count/DevsOnFlutter/file_manager?style=plastic) ![GitHub tag (latest by date)](https://img.shields.io/github/v/tag/DevsOnFlutter/file_manager?style=plastic) ![GitHub issues](https://img.shields.io/github/issues/DevsOnFlutter/file_manager?style=plastic)\n\nFileManager is a wonderful widget that allows you to manage files and folders, pick files and folders, and do a lot more.\nDesigned to feel like part of the Flutter framework.\n\n## Compatibility\n\n✅ \u0026nbsp; Android \u003c/br\u003e\n✅ \u0026nbsp; Linux \u003c/br\u003e\n❌ \u0026nbsp; Windows ([in progress](https://github.com/4-alok/file_manager/tree/windows-support))\u003c/br\u003e\n❌ \u0026nbsp; MacOS (active issue: [MacOS support](https://github.com/DevsOnFlutter/file_manager/issues/8)) \u003c/br\u003e\n\n## Usage\n\nMake sure to check out [examples](https://github.com/DevsOnFlutter/file_manager/blob/main/example/lib/main.dart) for more details.\n\n### Installation\n\n**Dependencies** Add the following line to `pubspec.yaml`:\n\n```yaml\ndependencies:\n  file_manager: ^1.0.0\n```\n\n### Give storage permission to application\n\n## Android\n\n Beside needing to add **WRITE_EXTERNAL_STORAGE** , **READ_EXTERNAL_STORAGE** and **MANAGE_EXTERNAL_STORAGE** to your android/app/src/main/AndroidManifest.xml.\n\n```xml\n\u003cmanifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    package=\"com.xxx.yyy\"\u003e\n    \u003cuses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/\u003e\n    \u003cuses-permission android:name=\"android.permission.READ_EXTERNAL_STORAGE\"/\u003e\n    \u003cuses-permission android:name=\"android.permission.MANAGE_EXTERNAL_STORAGE\" /\u003e\n\n...\n\u003c/manifest\u003e\n```\n\nalso add for Android 10\n\n```xml\n    \u003capplication\n      android:requestLegacyExternalStorage=\"true\"   \n      .../\u003e\n```\n\n**You also need Runtime Request Permission**\nallow storage permission from app setting manually or you may use any package such as [`permission_handler`](https://pub.dev/packages/permission_handler).\n\nor use `FileManager` to request permission at runtime.\n\n```dart\n  // request permission\n  await FileManager.requestFilesAccessPermission();\n```\n\n\u003c/hr\u003e\n\n### Basic setup\n\n*The complete example is available [here](https://github.com/DevsOnFlutter/file_manager/blob/main/example/lib/main.dart).*\n\nRequired parameter for **FileManager** are `controller` and `builder`\n\n* `controller` The controller updates value and notifies its listeners, and FileManager updates itself appropriately whenever the user modifies the path or changes the sort-type with an associated FileManagerController.\n\n```dart\nfinal FileManagerController controller = FileManagerController();\n```\n\n* `builder` This function allows you to create custom widgets and retrieve a list of entities `List\u003cFileSystemEntity\u003e.`\n\n## Sample code\n\n```dart\nFileManager(\n    controller: controller,\n    builder: (context, snapshot) {\n    final List\u003cFileSystemEntity\u003e entities = snapshot;\n      return ListView.builder(\n        itemCount: entities.length,\n        itemBuilder: (context, index) {\n          return Card(\n            child: ListTile(\n              leading: FileManager.isFile(entities[index])\n                  ? Icon(Icons.feed_outlined)\n                  : Icon(Icons.folder),\n              title: Text(FileManager.basename(entities[index])),\n              onTap: () {\n                if (FileManager.isDirectory(entities[index])) {\n                    controller.openDirectory(entities[index]);   // open directory\n                  } else {\n                      // Perform file-related tasks.\n                  }\n              },\n            ),\n          );\n        },\n      );\n  },\n),\n```\n\n\u003c/hr\u003e\n\n## FileManager\n\n|  Properties  |   Description   |\n|--------------|-----------------|\n| `loadingScreen` | For the loading screen, create a custom widget. A simple Centered CircularProgressIndicator is provided by default. |\n| `emptyFolder` | For an empty screen, create a custom widget. |\n| `controller` | For an empty screen, create a custom widget. |\n| `hideHiddenEntity` | Hide the files and folders that are hidden. |\n| `builder` | This function allows you to create custom widgets and retrieve a list of entities `List\u003cFileSystemEntity\u003e.` |\n\n## FileManagerController\n\n|  Properties  |   Description   |\n|--------------|-----------------|\n| `getSortedBy` | The sorting type that is currently in use is returned. |\n| `setSortBy` | is used to set the sorting type. `SortBy{ name, type, date, size }`. ie: `controller.sortBy(SortBy.date)` |\n| `getCurrentDirectory` | Get current Directory |\n| `getCurrentPath` | Get current path, similar to [getCurrentDirectory]. |\n| `setCurrentPath` | Set current directory path by providing `String` of path, similar to [openDirectory]. `List\u003cFileSystemEntity\u003e.` |\n| `isRootDirectory` | return true if current directory is the root. false, if the current directory not on root of the storage. |\n| `goToParentDirectory` | Jumps to the parent directory of currently opened directory if the parent is accessible. |\n| `openDirectory` | Open directory by providing `Directory`. |\n| `titleNotifier` | ValueNotifier of the current directory's basename |\n\n## ControlBackButton\n\nWhen the current directory is not root, this widget registers a callback to prevent the user from dismissing the window, or controllers the system's back button\n\nie:-\n\n```dart\n  // Wrap Scaffold containing FileManage with ControlBackButton\n  ControlBackButton(\n    controller: controller\n    child: Scaffold(\n      appBar: AppBar(...)\n      body: FileManager(\n        ...\n      )\n    )\n  )\n```\n\n## Others\n\n|  Properties  |   Description   |\n|--------------|-----------------|\n| `isFile` | check weather FileSystemEntity is File. |\n| `isDirectory` | check weather FileSystemEntity is Directory. |\n| `basename` | Get the basename of Directory or File. Provide `File`, `Directory` or `FileSystemEntity` and returns the name as a `String`. If you want to hide the extension of a file, you may use optional parameter `showFileExtension`. ie ```controller.dirName(dir, true)```|\n| `formatBytes` | Convert bytes to human readable size.[getCurrentDirectory]. |\n| `setCurrentPath` | Set current directory path by providing `String` of path, similar to [openDirectory]. `List\u003cFileSystemEntity\u003e.` |\n| `getFileExtension` | Return file extension as String. ie:- `File(\"/../image.png\")` to `\"png\"`. |\n| `getStorageList` | Get list of available storage in the device, returns an empty list if there is no storage `List\u003cDirectory\u003e`|\n| `createFolder` | Creates the directory if it doesn't exist. Requires currentPath and Name of the Directory. |\n\n\u003c/hr\u003e\n\u003cp\u003e\n\n\u003cimg width=\"205px\" height =\"444px\" alt=\"Example\" src=\"https://imgur.com/RXwvwB9.gif\"/\u003e\n\u003cimg width=\"205px\" height =\"444px\" alt=\"Example\" src=\"https://imgur.com/a56XQv7.png\"/\u003e\n\u003cimg width=\"205px\" height =\"444px\" alt=\"Example\" src=\"https://imgur.com/q4Ouf3M.png\"/\u003e\n\u003cimg width=\"205px\" height =\"444px\" alt=\"Example\" src=\"https://imgur.com/CwB5wb0.png\"/\u003e\n\n\u003c/p\u003e\n\u003c/hr\u003e\n\n## Show some :heart: and :star: the repo\n\n![GitHub Repo stars](https://img.shields.io/github/stars/DevsOnFlutter/file_manager?style=social)\n![GitHub forks](https://img.shields.io/github/forks/DevsOnFlutter/file_manager?style=social)\n[![GitHub followers](https://img.shields.io/github/followers/4-alok?style=social)](https://github.com/4-alok/)\n\n## Project Created \u0026 Maintained By\n\n* ### [DevsOnFlutter](https://github.com/DevsOnFlutter)\n\n\u003c/hr\u003e\n\n## Contributions\n\nContributions are welcomed!\n\nIf you feel that a hook is missing, feel free to open a pull-request.\n\nFor a custom-hook to be merged, you will need to do the following:\n\n* Describe the use-case.\n\n* Open an issue explaining why we need this hook, how to use it, ...\n  This is important as a hook will not get merged if the hook doesn't appeal to\n  a large number of people.\n\n* If your hook is rejected, don't worry! A rejection doesn't mean that it won't\n  be merged later in the future if more people shows an interest in it.\n  In the mean-time, feel free to publish your hook as a package on \u003chttps://pub.dev\u003e.\n\n* A hook will not be merged unless fully tested, to avoid breaking it inadvertently\n  in the future.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevsonflutter%2Ffile_manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevsonflutter%2Ffile_manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevsonflutter%2Ffile_manager/lists"}