All Projects → DevsOnFlutter → file_manager

DevsOnFlutter / file_manager

Licence: BSD-3-Clause license
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.

Programming Languages

dart
5743 projects
CMake
9771 projects
C++
36643 projects - #6 most used programming language
c
50402 projects - #5 most used programming language
swift
15916 projects
kotlin
9241 projects
objective c
16641 projects - #2 most used programming language

Projects that are alternatives of or similar to file manager

flutter easyloading
✨A clean and lightweight loading/toast widget for Flutter, easy to use without context, support iOS、Android and Web
Stars: ✭ 1,021 (+2586.84%)
Mutual labels:  widget, flutter-package
fludget
Learn Flutter on Flutter! A widget directory with implementation samples!
Stars: ✭ 26 (-31.58%)
Mutual labels:  widget, hacktoberfest2021
Motion-Tab-Bar
A beautiful animated flutter widget package library. The tab bar will attempt to use your current theme out of the box, however you may want to theme it.
Stars: ✭ 237 (+523.68%)
Mutual labels:  widget, flutter-package
feedback
A simple widget for getting better feedback.
Stars: ✭ 178 (+368.42%)
Mutual labels:  widget, flutter-package
js-fileexplorer
A zero dependencies, customizable, pure Javascript widget for navigating, managing, uploading, and downloading files and folders or other hierarchical object structures on any modern web browser.
Stars: ✭ 124 (+226.32%)
Mutual labels:  widget, file-manager
sounds
Flutter plugin for sound. Audio recorder and player.
Stars: ✭ 74 (+94.74%)
Mutual labels:  widget, flutter-package
incrementally loading listview
An extension of the Flutter ListView widget for incrementally loading items upon scrolling
Stars: ✭ 172 (+352.63%)
Mutual labels:  widget, flutter-package
tempat-kontributor
Merupakan tempat bagi kalian untuk berkontributor bersama kami
Stars: ✭ 33 (-13.16%)
Mutual labels:  hacktoberfest2021
Top-Ethical-Hacking-Resources
Stay up-to-date with the latest and greatest ethical hacking tools and resources.
Stars: ✭ 22 (-42.11%)
Mutual labels:  hacktoberfest2021
flutter-rehberi
Flutter için Türkçe ve İngilizce kaynakların toplandığı rehber
Stars: ✭ 730 (+1821.05%)
Mutual labels:  flutter-package
DesktopAssistant
A Virtual Desktop Assistant Written in Python
Stars: ✭ 579 (+1423.68%)
Mutual labels:  hacktoberfest2021
hacktoberfest 2021
This is a repository for anyone wishing to contribute to HacktoberFest 2021
Stars: ✭ 51 (+34.21%)
Mutual labels:  hacktoberfest2021
PracticeApp
A "must-have a look" project for newcomers in android.
Stars: ✭ 38 (+0%)
Mutual labels:  hacktoberfest2021
o-fish-realm
Realm application code and sample data for the Officer's Fishery Information Sharing Hub (O-FISH). The mobile app allows fisheries officers to document and share critical information gathered during a routine vessel inspection. The web app allows agencies to gain insights from the aggregated information.
Stars: ✭ 23 (-39.47%)
Mutual labels:  hacktoberfest2021
sliding panel
A Flutter slidable widget that provides an easy to use configuration. Highly customisable. Just as you want it!
Stars: ✭ 88 (+131.58%)
Mutual labels:  flutter-package
sweetalert
sweetalert for flutter
Stars: ✭ 52 (+36.84%)
Mutual labels:  flutter-package
Awesome-Machine-Learning-Models
Contribute your amazing Machine Learning, Data Science, and Deep Learning repository
Stars: ✭ 16 (-57.89%)
Mutual labels:  hacktoberfest2021
Wizard-Of-Docs
A open source project to bring all the data structures and algorithms docs under one repository.
Stars: ✭ 19 (-50%)
Mutual labels:  hacktoberfest2021
yii2-widget-cropbox
This widget allows crop image before upload to server and send informations about crop in JSON format.
Stars: ✭ 90 (+136.84%)
Mutual labels:  widget
WebBlocks
zero-to-mastery re-usable web component library.
Stars: ✭ 20 (-47.37%)
Mutual labels:  hacktoberfest2021

File Manager

FileManager-Banner

GitHub GitHub code size in bytes GitHub top language GitHub language count GitHub tag (latest by date) GitHub issues

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.

Compatibility

  Android
  Linux
  Windows (in progress)
  Web
  MacOS (active issue: MacOS support)
  iOS (active issue: iOS support)

Usage

Make sure to check out examples for more details.

Installation

Dependencies Add the following line to pubspec.yaml:

dependencies:
  file_manager: ^1.0.0

Give storage permission to application

Android: Beside needing to add WRITE_EXTERNAL_STORAGE and READ_EXTERNAL_STORAGE to your android/app/src/main/AndroidManifest.xml.

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.xxx.yyy">
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
...
</manifest>

also add for Android 10

    <application
      android:requestLegacyExternalStorage="true"   
      ...

You also need Runtime Request Permission allow storage permission from app setting manually or you may use any package such as permission_handler.

Basic setup

The complete example is available here.

Required parameter for FileManager are controller and builder

  • 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.
final FileManagerController controller = FileManagerController();
  • builder This function allows you to create custom widgets and retrieve a list of entities List<FileSystemEntity>.

Sample code

FileManager(
    controller: controller,
    builder: (context, snapshot) {
    final List<FileSystemEntity> entities = snapshot;
      return ListView.builder(
        itemCount: entities.length,
        itemBuilder: (context, index) {
          return Card(
            child: ListTile(
              leading: FileManager.isFile(entities[index])
                  ? Icon(Icons.feed_outlined)
                  : Icon(Icons.folder),
              title: Text(FileManager.basename(entities[index])),
              onTap: () {
                if (FileManager.isDirectory(entities[index])) {
                    controller.openDirectory(entities[index]);   // open directory
                  } else {
                      // Perform file-related tasks.
                  }
              },
            ),
          );
        },
      );
  },
),

FileManager

Properties Description
loadingScreen For the loading screen, create a custom widget. A simple Centered CircularProgressIndicator is provided by default.
emptyFolder For an empty screen, create a custom widget.
controller For an empty screen, create a custom widget.
hideHiddenEntity Hide the files and folders that are hidden.
builder This function allows you to create custom widgets and retrieve a list of entities List<FileSystemEntity>.

FileManagerController

Properties Description
getSortedBy The sorting type that is currently in use is returned.
setSortBy is used to set the sorting type. SortBy{ name, type, date, size }. ie: controller.sortBy(SortBy.date)
getCurrentDirectory Get current Directory
getCurrentPath Get current path, similar to [getCurrentDirectory].
setCurrentPath Set current directory path by providing String of path, similar to [openDirectory]. List<FileSystemEntity>.
isRootDirectory return true if current directory is the root. false, if the current directory not on root of the storage.
goToParentDirectory Jumps to the parent directory of currently opened directory if the parent is accessible.
openDirectory Open directory by providing Directory.
titleNotifier ValueNotifier of the current directory's basename

ControlBackButton

When 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

ie:-

  // Wrap Scaffold containing FileManage with ControlBackButton
  ControlBackButton(
    controller: controller
    child: Scaffold(
      appBar: AppBar(...)
      body: FileManager(
        ...
      )
    )
  )

Others

Properties Description
isFile check weather FileSystemEntity is File.
isDirectory check weather FileSystemEntity is Directory.
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)
formatBytes Convert bytes to human readable size.[getCurrentDirectory].
setCurrentPath Set current directory path by providing String of path, similar to [openDirectory]. List<FileSystemEntity>.
getFileExtension Return file extension as String. ie:- File("/../image.png") to "png".
getStorageList Get list of available storage in the device, returns an empty list if there is no storage List<Directory>
createFolder Creates the directory if it doesn't exist. Requires currentPath and Name of the Directory.

Example Example Example Example

Show some ❤️ and the repo

GitHub Repo stars GitHub forks GitHub followers

Project Created & Maintained By

Contributions

Contributions are welcomed!

If you feel that a hook is missing, feel free to open a pull-request.

For a custom-hook to be merged, you will need to do the following:

  • Describe the use-case.

  • Open an issue explaining why we need this hook, how to use it, ... This is important as a hook will not get merged if the hook doesn't appeal to a large number of people.

  • If your hook is rejected, don't worry! A rejection doesn't mean that it won't be merged later in the future if more people shows an interest in it. In the mean-time, feel free to publish your hook as a package on https://pub.dev.

  • A hook will not be merged unless fully tested, to avoid breaking it inadvertently in the future.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].