From 97e5a46ad9f5f84577c8780990ad6fd22364a53b Mon Sep 17 00:00:00 2001 From: Miguel Ruivo Date: Thu, 6 Dec 2018 15:21:34 +0000 Subject: [PATCH] minor refactor --- README.md | 2 +- .../java/com/mr/flutter/plugin/filepicker/FilePickerPlugin.java | 2 +- example/pubspec.yaml | 2 +- lib/file_picker.dart | 2 ++ 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index bef237f..956627e 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ Since we are using *image_picker* as a dependency from this plugin to load paths * `NSMicrophoneUsageDescription` - describe why your app needs access to the microphone, if you intend to record videos. This is called _Privacy - Microphone Usage Description_ in the visual editor. ## To-do -* [X] Load paths from local files & cloud (GDrive, Dropbox, iCloud) +* [X] Load paths from **cloud files** (GDrive, Dropbox, iCloud) * [X] Load path from **PDF** * [X] Load path from **gallery** * [X] Load path from **camera** diff --git a/android/src/main/java/com/mr/flutter/plugin/filepicker/FilePickerPlugin.java b/android/src/main/java/com/mr/flutter/plugin/filepicker/FilePickerPlugin.java index 940ac14..b49139d 100644 --- a/android/src/main/java/com/mr/flutter/plugin/filepicker/FilePickerPlugin.java +++ b/android/src/main/java/com/mr/flutter/plugin/filepicker/FilePickerPlugin.java @@ -133,7 +133,7 @@ public class FilePickerPlugin implements MethodCallHandler { private String resolveType(String type) { - switch (type){ + switch (type) { case "PDF": return "application/pdf"; case "VIDEO": diff --git a/example/pubspec.yaml b/example/pubspec.yaml index aa4639c..1719120 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -1,5 +1,5 @@ name: file_picker_example -description: Demonstrates how to use the file_picker plugin. +description: An example of how to use the file_picker plugin. # The following defines the version and build number for your application. # A version number is three numbers separated by dots, like 1.2.43 diff --git a/lib/file_picker.dart b/lib/file_picker.dart index 16f0234..97002ae 100644 --- a/lib/file_picker.dart +++ b/lib/file_picker.dart @@ -32,6 +32,8 @@ class FilePicker { return _getPath('PDF'); case FileType.VIDEO: return _getPath('VIDEO'); + case FileType.ANY: + return _getPath('ANY'); default: return _getPath('ANY'); }