pub package

A set of utilities, that help to manage the files & directories in Android system.

You are in your way to create to file manager app or a gallery app.

Getting Started

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

For help on editing package code, view the documentation.



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

    sdk: flutter
  path: ^1.6.2
  path_provider: ^0.4.1
  flutter_file_manager: ^0.0.3

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 give Storage permissions to your app, manually or by this plugin simple_permissions

import 'dart:async';
import 'dart:io';

import 'package:flutter/material.dart';
import 'package:path_provider/path_provider.dart';
import 'package:flutter_file_manager/flutter_file_manager.dart';

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

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

class _MyAppState extends State<MyApp> {
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: FutureBuilder(
            future: buildImages(),
            builder: (BuildContext context, AsyncSnapshot snapshot) {
              if (snapshot.hasData) {
                return GridView.builder(
                  gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
                    crossAxisCount: 3,
                    crossAxisSpacing: 0.0,
                    mainAxisSpacing: 0.0,
                  primary: false,
                  itemCount: 50, // equals the recents files length

                  itemBuilder: (context, index) {
                    return Image.file(File(snapshot.data[index]));
              } else if (snapshot.connectionState == ConnectionState.waiting) {
                return Text("Loading");

  Future buildImages() async {
    var root = await getExternalStorageDirectory();
    List<String> files =
        await FileManager.filesTreeList(root.path, extensions: ["png", "jpg"]);
    return files;



  • file details
  • search files or directory: supports regular expressions
  • recent created files: you exclude a list of directories from the tree
  • directories only tree: you exclude a list of directories from the tree
  • files only tree: you exclude a list of directories from the tree
  • files list


Contact me