How to add a File Picker plugin in Flutter?

Melvin Abraham picture Melvin Abraham · Jun 20, 2018 · Viewed 23.4k times · Source

I am creating a Flutter project in which, I have a piece of data (JSON) that I want to Import from and Export to a location the user wants to. In order to achieve this, I require a File Picker plugin in Flutter. Now, I searched the Dart Packages repository for "file picker" but didn't find one.

Is there a way to get a File Picker that looks like this:

or even this...

The first screenshot is preferable for me as it allows file selection from different sources (like Drive).

Also, since I want to Export the data, I might want a Folder Picker too. ;)
But, if there is any other alternative to Folder Picker. I'd be happy to know...

Answer

Miguel Ruivo picture Miguel Ruivo · Oct 22, 2018

I've created a file_picker plugin some time ago in order to make it possible to pick (both on iOS and Android) absolute paths and then loaded it with Flutter.

You can check it here: https://pub.dev/packages/file_picker