folder_picker 0.3.0 copy "folder_picker: ^0.3.0" to clipboard
folder_picker: ^0.3.0 copied to clipboard

A directory picker for Flutter. Select a directory from the filesystem

Folder picker #

pub package

A directory picker for Flutter

Usage #

A picker page is available as well as a standalone widget.

import 'package:folder_picker/folder_picker.dart';

Navigator.of(context).push<FolderPickerPage>(
   MaterialPageRoute(
      builder: (BuildContext context) {
         return FolderPickerPage(
            rootDirectory: externalDirectory, /// a [Directory] object
            action: (BuildContext context, Directory folder) async {
              print("Picked folder $folder");
            });
}));

To allow directory creation:

final controller = FilexController(path: externalDirectory.path);
FolderPicker(
   rootDirectory: externalDirectory,
   controller: controller
   // ...
)

And then use the controller when you want to create a directory:

controller.createDirectory(name); // name is a String

To get just the widget and not a full page use FolderPicker

Parameters #

  • rootDirectory Directory required: the top level directory to start from
  • action AfterPickedAction required: the action to perform after picking
  • compact: bool default false: use compact display
  • pickerIcon: Icon: the icon to use for the picker
  • controller: FilexController the file explorer controller used to create directories

Permissions #

<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
6
likes
40
pub points
44%
popularity

Publisher

unverified uploader

A directory picker for Flutter. Select a directory from the filesystem

Repository (GitHub)
View/report issues

License

MIT (LICENSE)

Dependencies

cupertino_icons, filex, flutter, path

More

Packages that depend on folder_picker