folder_picker

Last updated:

0 purchases

folder_picker Image
folder_picker Images
Add to Cart

Description:

folder picker

Folder picker #

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");
});
}));
copied to clipboard
To allow directory creation:
final controller = FilexController(path: externalDirectory.path);
FolderPicker(
rootDirectory: externalDirectory,
controller: controller
// ...
)
copied to clipboard
And then use the controller when you want to create a directory:
controller.createDirectory(name); // name is a String
copied to clipboard
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" />
copied to clipboard

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.