folder_picker 0.3.0

  • Readme
  • Changelog
  • Example
  • Installing
  • 85

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" />

Changelog #

0.3.0 #

  • Refactor using the Filex package
  • Add a pickerIcon parameter
  • Add the compact parameter
  • Add the ability to create a directory
  • Add a ready to use page in addition to the widget

0.2.1 #

  • Improve buttons

0.2.0 #

  • Make the action callback asynchronous

0.1.0 #

Initial release

example/README.md

example #

A new Flutter project.

Getting Started #

This project is a starting point for a Flutter application.

A few resources to get you started if this is your first Flutter project:

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  folder_picker: ^0.3.0

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:folder_picker/folder_picker.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
71
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
85
Learn more about scoring.

We analyzed this package on Oct 21, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.5.1
  • pana: 0.12.21
  • Flutter: 1.9.1+hotfix.4

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
cupertino_icons ^0.1.2 0.1.2
filex ^0.2.2 0.2.2
flutter 0.0.0
path ^1.6.4 1.6.4
Transitive dependencies
collection 1.14.11 1.14.12
filesize 1.0.4
flutter_slidable 0.5.4
meta 1.1.7
open_file 2.0.3
rxdart 0.22.4
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test
pedantic ^1.6.0 1.8.0+1