Beta (#55)
* If picker is canceled in `getFile()`, it should return `null`
This commit is contained in:
parent
094d0cd03b
commit
43796d2a21
|
@ -1,3 +1,7 @@
|
|||
## 1.3.2
|
||||
|
||||
**Bug fix:** Returns a `null` value in the `getFile()` when the picker is canceled.
|
||||
|
||||
## 1.3.1
|
||||
|
||||
**Bug fix:** Fixes an issue on Android, where other activity would try to call `FilePicker`'s result object when it shouldn't.
|
||||
|
|
|
@ -10,7 +10,7 @@ A package that allows you to use a native file explorer to pick single or multip
|
|||
First, add *file_picker* as a dependency in [your pubspec.yaml file](https://flutter.io/platform-plugins/).
|
||||
|
||||
```
|
||||
file_picker: ^1.3.1
|
||||
file_picker: ^1.3.2
|
||||
```
|
||||
### Android
|
||||
Add `<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>` to your app `AndroidManifest.xml` file. This is required due to file caching when a path is required from a remote file (eg. Google Drive).
|
||||
|
|
|
@ -40,7 +40,7 @@ class FilePicker {
|
|||
/// you are planing to create a `File` for the returned path.
|
||||
static Future<File> getFile({FileType type = FileType.ANY, String fileExtension}) async {
|
||||
final String filePath = await _getPath(_handleType(type, fileExtension), false);
|
||||
return File(filePath);
|
||||
return filePath != null ? File(filePath) : null;
|
||||
}
|
||||
|
||||
static Future<dynamic> _getPath(String type, bool multipleSelection) async {
|
||||
|
|
|
@ -2,7 +2,7 @@ name: file_picker
|
|||
description: A package that allows you to use a native file explorer to pick single or multiple absolute file paths, with extensions filtering support.
|
||||
author: Miguel Ruivo <miguelpruivo@outlook.com>
|
||||
homepage: https://github.com/miguelpruivo/plugins_flutter_file_picker
|
||||
version: 1.3.1
|
||||
version: 1.3.2
|
||||
|
||||
|
||||
dependencies:
|
||||
|
|
Loading…
Reference in New Issue