Flutter file manager - Flutter package for managing files on Android

Overview

flutter_file_utils

Helper tools for managing files on Android.

Getting Started

For help getting started with Flutter, view our online documentation.

For help on editing package code, view the documentation.

Screenshots

Usage

To use this package, add these
dependency in your pubspec.yaml file.

dependencies:
  flutter:
    sdk: flutter
  path: 1.6.2
  path_provider: 0.5.0+1
  flutter_file_utils: ^0.2.0

And, add read / write permissions in your android/app/src/main/AndroidManifest.xml

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>

Don't forget to grant Storage permissions to your app, manually or by this plugin simple_permissions

// dart files
import 'dart:async';

// framework
import 'package:flutter/material.dart';

// packages
import 'package:path_provider/path_provider.dart';
import 'package:flutter_file_utils/flutter_file_utils.dart';
import 'package:simple_permissions/simple_permissions.dart';

void main() => runApp(new MyApp());

class MyApp extends StatefulWidget {
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  Widget build(BuildContext context) {
    SimplePermissions.requestPermission(Permission.ReadExternalStorage);
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: Text("Flutter File Manager Example"),
        ),
        body: FutureBuilder(
            future: _files(),
            builder: (BuildContext context, AsyncSnapshot snapshot) {
              if (snapshot.connectionState == ConnectionState.done) {
                return ListView.builder(
                  itemCount: snapshot.data?.length ?? 0,
                  itemBuilder: (context, index) {
                    return ListTile(
                      title: Text(snapshot.data[index].path.split('/').last),
                    );
                  },
                );
              } else if (snapshot.connectionState == ConnectionState.waiting) {
                return Center(child: Text("Loading"));
              }
            }),
      ),
    );
  }

  _files() async {
    var root = await getExternalStorageDirectory();
    var files = await FileManager(root: root).walk().toList();
    return files;
  }
}

Examples

Features

  • File Details
  • Search files or directories: supports regular expressions
  • Recent created files: you can exclude a list of directories from the tree
  • Directories only tree: you can exclude a list of directories from the tree
  • Files only tree: you can exclude a list of directories from the tree
  • Files list from specific point
  • Delete files
  • Delete directory
  • Temp file
  • Sorting
    • Type
    • Size
    • Date
    • Alpha
  • Filtering
    • Extensions
    • Files only
    • Directories only
  • System Tools
    • Copy
    • Rename

Contributors

Donate

Contact me

You might also like...

This package helps developer to sort the flutter/dart packages and plugins alphabetically, This makes it easier when managing too many packages and when working with teams

This package helps developer to sort the flutter/dart packages and plugins alphabetically, This makes it easier when managing too many packages and when working with teams

Package helps to sort the flutter/dart packages and plugins alphabetically, This makes it easier when managing too many packages and when working with

Dec 21, 2022

A GUI package manager and package installer for Windows Subsystem for Android (WSA)

A GUI package manager and package installer for Windows Subsystem for Android (WSA)

wsa_pacman A GUI package manager and package installer for Windows Subsystem for Android (WSA). Currently provides a double-click GUI installer for .a

Jan 1, 2023

A GUI package manager and package installer for Windows Subsystem for Android (WSA)

A GUI package manager and package installer for Windows Subsystem for Android (WSA)

wsa_pacman A GUI package manager and package installer for Windows Subsystem for Android (WSA). Currently provides a double-click GUI installer for .a

Nov 14, 2022

Flutter plugin (android) for sharing bytes and files Offline, (Based on the android Nearby Connections API)

nearby_connections An android flutter plugin for the Nearby Connections API Currently supports Bytes and Files. Transfer Data between multiple connect

Nov 21, 2022

Packup - Flutter app for managing delivered packages in office

Packup - Flutter app for managing delivered packages in office

Packup Mobile app for Android and iOS with web admin panel, for managing package

Jan 22, 2022

Building a simple Flutter app for understanding the BLoC State Management including: Cubit, Managing Route & showSnackBar.

Building a simple Flutter app for understanding the BLoC State Management including: Cubit, Managing Route & showSnackBar.

Dec 3, 2022

Practice building basic animations in apps along with managing app state by BLoC State Management, Flutter Slider.

Practice building basic animations in apps along with managing app state by BLoC State Management including: Cubit & Animation Widget, Flutter Slider.

Jun 8, 2022

A capable library for managing Windows tray icons in your Flutter app 🦋

skip to content A capable tray icon plugin for Windows. 🔗 package on pub.dev 🔗 source on github.com 🔗 dart docs api reference Manage multiple icon

May 27, 2022

Building a simple Flutter app * Switch Theme * for understanding the BLoC State Management including: Cubit Communications with StreamSubscription & Managing Route.

Building a simple Flutter app * Switch Theme * for understanding the BLoC State Management including: Cubit Communications with StreamSubscription & Managing Route.

Oct 3, 2022
Comments
  • FAILURE: Build failed with an exception.

    FAILURE: Build failed with an exception.

    FAILURE: Build failed with an exception.

    • What went wrong: Execution failed for task ':app:processDebugResources'.

    Android resource linking failed Output: /mnt/HDD/FlutterProjects/animation101/build/app/intermediates/merged_manifests/debug/processDebugManifest/merged/AndroidManifest.xml:27: error: unexpected element found in . /mnt/HDD/FlutterProjects/animation101/build/app/intermediates/merged_manifests/debug/processDebugManifest/merged/AndroidManifest.xml:28: error: unexpected element found in .

    Command: /home/ahmed/.gradle/caches/transforms-1/files-1.1/aapt2-3.2.1-4818971-linux.jar/4d17d4c927436b065609252263f4e99c/aapt2-3.2.1-4818971-linux/aapt2 link -I
    /home/ahmed/Android/Sdk/platforms/android-28/android.jar
    --manifest
    /mnt/HDD/FlutterProjects/animation101/build/app/intermediates/merged_manifests/debug/processDebugManifest/merged/AndroidManifest.xml
    -o
    /mnt/HDD/FlutterProjects/animation101/build/app/intermediates/processed_res/debug/processDebugResources/out/resources-debug.ap_
    -R
    @/mnt/HDD/FlutterProjects/animation101/build/app/intermediates/incremental/processDebugResources/resources-list-for-resources-debug.ap_.txt
    --auto-add-overlay
    --java
    /mnt/HDD/FlutterProjects/animation101/build/app/generated/not_namespaced_r_class_sources/debug/processDebugResources/r
    --custom-package
    com.example.animation101
    -0
    apk
    --output-text-symbols
    /mnt/HDD/FlutterProjects/animation101/build/app/intermediates/symbols/debug/R.txt
    --no-version-vectors Daemon: AAPT2 aapt2-3.2.1-4818971-linux Daemon #0 Output: /mnt/HDD/FlutterProjects/animation101/build/app/intermediates/merged_manifests/debug/processDebugManifest/merged/AndroidManifest.xml:27: AAPT: error: unexpected element found in .

    /mnt/HDD/FlutterProjects/animation101/build/app/intermediates/merged_manifests/debug/processDebugManifest/merged/AndroidManifest.xml:28: AAPT: error: unexpected element found in .

    Command: /home/ahmed/.gradle/caches/transforms-1/files-1.1/aapt2-3.2.1-4818971-linux.jar/4d17d4c927436b065609252263f4e99c/aapt2-3.2.1-4818971-linux/aapt2 link -I
    /home/ahmed/Android/Sdk/platforms/android-28/android.jar
    --manifest
    /mnt/HDD/FlutterProjects/animation101/build/app/intermediates/merged_manifests/debug/processDebugManifest/merged/AndroidManifest.xml
    -o
    /mnt/HDD/FlutterProjects/animation101/build/app/intermediates/processed_res/debug/processDebugResources/out/resources-debug.ap_
    -R
    @/mnt/HDD/FlutterProjects/animation101/build/app/intermediates/incremental/processDebugResources/resources-list-for-resources-debug.ap_.txt
    --auto-add-overlay
    --java
    /mnt/HDD/FlutterProjects/animation101/build/app/generated/not_namespaced_r_class_sources/debug/processDebugResources/r
    --custom-package
    com.example.animation101
    -0
    apk
    --output-text-symbols
    /mnt/HDD/FlutterProjects/animation101/build/app/intermediates/symbols/debug/R.txt
    --no-version-vectors Daemon: AAPT2 aapt2-3.2.1-4818971-linux Daemon #0

    • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

    • Get more help at https://help.gradle.org

    BUILD FAILED in 11s


    The Gradle failure may have been because of AndroidX incompatibilities in this Flutter app. See https://goo.gl/CP92wY for more information on the problem and how to fix it.


    Finished with error: Gradle task assembleDebug failed with exit code 1

    opened by pavel-birdy 2
  • Fixed assertions and empty extension in FileFilter

    Fixed assertions and empty extension in FileFilter

    • Assertions: check that fileOnly and directoryOnly are not true at the same time
    • No allowedExtensions: treat every extension as allowed (failed previously, calling contains on null)
    opened by moritz-weber 1
  • FileSystemException: Directory listing failed, path = '/storage/emulated/0/Download/' (OS Error: No such file or directory, errno = 2)        at FileManager.dirsTree(file_manager.dart:110)

    FileSystemException: Directory listing failed, path = '/storage/emulated/0/Download/' (OS Error: No such file or directory, errno = 2) at FileManager.dirsTree(file_manager.dart:110)

    issue with permission even i grantes permission WRITE_EXTERNAL_STORAGE,READ_EXTERNAL_STORAGE

    andriod 6

    Non-fatal Exception: java.lang.Exception:

    Try to add thes lines to your AndroidManifest.xml file
    
          `<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>`
          `<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>`
    
    and grant storage permissions to your applicaion from app settings
    

    FileSystemException: Directory listing failed, path = '/storage/emulated/0/Download/' (OS Error: No such file or directory, errno = 2) at FileManager.dirsTree(file_manager.dart:110) at FileManager.filesTree(file_manager.dart:132) at FileManager.recentFilesAndDirs(file_manager.dart:43) at _VideoDownloadPageState._initFiles(video_page.dart:69)

    image

    opened by kw2019ltd 0
  •  java.lang.Exception: NoSuchMethodError: The getter 'millisecondsSinceEpoch' was called on null.

    java.lang.Exception: NoSuchMethodError: The getter 'millisecondsSinceEpoch' was called on null.

    Non-fatal Exception: java.lang.Exception: NoSuchMethodError: The getter 'millisecondsSinceEpoch' was called on null. Receiver: null Tried calling: millisecondsSinceEpoch at sortBy.(utils.dart:31) at .sortBy(utils.dart:26) at FileManager.recentFilesAndDirs(file_manager.dart:52) at _DownloadPageState._initFiles(download_page.dart:68) at _DownloadPageState.initDownloadsDirectoryState(download_page.dart:60) at _DownloadPageState.initState(download_page.dart:36) at StatefulElement._firstBuild(framework.dart:4355) at ComponentElement.mount(framework.dart:4201) at Element.inflateWidget(framework.dart:3194) at Element.updateChild(framework.dart:2988) at SingleChildRenderObjectElement.mount(framework.dart:5445) at Element.inflateWidget(framework.dart:3194) at Element.updateChild(framework.dart:2988) at SingleChildRenderObjectElement.mount(framework.dart:5445) at Element.inflateWidget(framework.dart:3194) at Element.updateChild(framework.dart:2988) at ComponentElement.performRebuild(framework.dart:4243) at Element.rebuild(framework.dart:3947) at ComponentElement._firstBuild(framework.dart:4206) at ComponentElement.mount(framework.dart:4201) at Element.inflateWidget(framework.dart:3194) at Element.updateChild(framework.dart:2988) at ComponentElement.performRebuild(framework.dart:4243) at Element.rebuild(framework.dart:3947) at ComponentElement._firstBuild(framework.dart:4206) at ComponentElement.mount(framework.dart:4201) at ParentDataElement.mount(framework.dart:4617) at Element.inflateWidget(framework.dart:3194) at Element.updateChild(framework.dart:2988) at ComponentElement.performRebuild(framework.dart:4243) at Element.rebuild(framework.dart:3947) at ComponentElement._firstBuild(framework.dart:4206) at StatefulElement._firstBuild(framework.dart:4381) at ComponentElement.mount(framework.dart:4201) at Element.inflateWidget(framework.dart:3194) at Element.updateChild(framework.dart:2988) at ComponentElement.performRebuild(framework.dart:4243) at Element.rebuild(framework.dart:3947) at ComponentElement._firstBuild(framework.dart:4206) at ComponentElement.mount(framework.dart:4201) at Element.inflateWidget(framework.dart:3194) at Element.updateChild(framework.dart:2988) at SliverMultiBoxAdaptorElement.updateChild(sliver.dart:1288) at SliverMultiBoxAdaptorElement.createChild.(sliver.dart:1273) at BuildOwner.buildScope(framework.dart:2412) at SliverMultiBoxAdaptorElement.createChild(sliver.dart:1266) at RenderSliverMultiBoxAdaptor._createOrObtainChild.(sliver_multi_box_adaptor.dart:354) at RenderObject.invokeLayoutCallback.(object.dart:1823) at PipelineOwner._enableMutationsToDirtySubtrees(object.dart:875) at RenderObject.invokeLayoutCallback(object.dart:1823) at RenderSliverMultiBoxAdaptor._createOrObtainChild(sliver_multi_box_adaptor.dart:343) at RenderSliverMultiBoxAdaptor.insertAndLayoutChild(sliver_multi_box_adaptor.dart:489) at RenderSliverFixedExtentBoxAdaptor.performLayout(sliver_fixed_extent_list.dart:255) at RenderObject.layout(object.dart:1724) at RenderSliverEdgeInsetsPadding.performLayout(sliver_padding.dart:134) at _RenderSliverFractionalPadding.performLayout(sliver.dart:1165) at RenderObject.layout(object.dart:1724) at RenderViewportBase.layoutChildSequence(viewport.dart:410) at RenderViewport._attemptLayout(viewport.dart:1367) at RenderViewport.performLayout(viewport.dart:1285) at RenderObject._layoutWithoutResize(object.dart:1584) at PipelineOwner.flushLayout(object.dart:844) at RendererBinding.drawFrame(binding.dart:344) at WidgetsBinding.drawFrame(binding.dart:774) at RendererBinding._handlePersistentFrameCallback(binding.dart:283) at SchedulerBinding._invokeFrameCallback(binding.dart:1102) at SchedulerBinding.handleDrawFrame(binding.dart:1041) at SchedulerBinding._handleDrawFrame(binding.dart:957)

    image

    opened by kw2019ltd 0
Owner
Mohamed Naga
Mohamed Naga is a hobbyist developer.
Mohamed Naga
Download files from Firebase Storage with Flutter. List all images, videos, or other files from Firebase and download them.

Flutter Tutorial - Download Files From Firebase Storage Download files from Firebase Storage with Flutter. List all images, videos, or other files fro

Johannes Milke 28 Dec 4, 2022
Upload Files To Firebase Storage with Flutter. Pick images, videos, or other files from your device and upload them to Firebase.

Flutter Tutorial - Upload Files To Firebase Storage Upload Files To Firebase Storage with Flutter. Pick images, videos, or other files from your devic

Johannes Milke 30 Dec 28, 2022
Flutter file based routing - File based routing and nested layouts for Flutter

Flutter File Based Routing I was inspired by the routing in remix.run with neste

Rody Davis 10 Sep 29, 2022
A simple flutter app that downloads a file from the internet, shows a custom-made download progress dialog and saves the file to device's internal storage

http_downloader A simple flutter app that downloads a file from the internet using the http plugin. It has a custom-designed progress dialog which dis

Akora Ing. Debrah Kwesi Buabeng 4 Apr 6, 2021
Flutter Download Manager is a Cross-Platform file downloader with Parallel and Batch Download support

Flutter Download Manager is a Cross-Platform file downloader with Parallel and Batch Download support. Manage download tasks by url and be notified of status and their progress. Pause, Cancel, Queue and Resume Downloads.

Nabil Mosharraf 11 Dec 17, 2022
Daily-Task-Manager a daily task manager application project created in flutter

This is a daily task manager application project created in flutter. Install this application on Android - Install from Play Store

DVS 0 May 10, 2022
This project is a rebuild of the existing movie colony https://github.com/debbsefe/Movie-Colony. Here's also a link to the figma file https://www.figma.com/file/XpLFNEsROiN1z6lwnNHMrU/Movie-app?node-id=2956%3A10161

Tvfiy Generated by the Very Good CLI ?? A Very Good Project created by Very Good CLI. Getting Started ?? This project contains 3 flavors: development

Eferha Mamus 3 Nov 12, 2022
RT File Manager (Acronym TBD)

RT File Manager (Acronym tbd) Linux file manager with inspiration from GNOME Files and MacOS's Finder Everything is WIP, most features missing! Made i

Wazzaps 17 Dec 15, 2022
Kyber Mod Manager A Mod Manager build for Kyber.

Kyber Mod Manager A Mod Manager build for Kyber. This app is not affiliated with Kyber or any of its creators. Key Features • Download • Screenshots •

liam 14 Sep 25, 2022
Flutter Downloader - A plugin for creating and managing download tasks. Supports iOS and Android.

Flutter Downloader A plugin for creating and managing download tasks. Supports iOS and Android. This plugin is based on WorkManager in Android and NSU

Flutter Community 789 Jan 3, 2023