This commit is contained in:
Miguel Ruivo 2021-05-26 11:51:41 +01:00
parent a291b74779
commit dee3b2efe9
4 changed files with 9 additions and 4 deletions

View File

@ -1,3 +1,6 @@
## 3.0.2+2
- Fixes [#725](https://github.com/miguelpruivo/flutter_file_picker/issues/725).
## 3.0.2
##### General
- `name` and `size` properties are now non-nullable types.

View File

@ -85,7 +85,8 @@ abstract class FilePicker extends PlatformInterface {
/// of it whenever needed. However, this will force the cleanup if you want to manage those on your own.
///
/// Returns [true] if the files were removed with success, [false] otherwise.
Future<bool?> clearTemporaryFiles() async => throw UnimplementedError('clearTemporaryFiles() has not been implemented.');
Future<bool?> clearTemporaryFiles() async => throw UnimplementedError(
'clearTemporaryFiles() has not been implemented.');
/// Selects a directory and returns its absolute path.
///
@ -93,5 +94,6 @@ abstract class FilePicker extends PlatformInterface {
/// Returns [null] if folder path couldn't be resolved.
///
/// Note: Some Android paths are protected, hence can't be accessed and will return `/` instead.
Future<String?> getDirectoryPath() async => throw UnimplementedError('getDirectoryPath() has not been implemented.');
Future<String?> getDirectoryPath() async =>
throw UnimplementedError('getDirectoryPath() has not been implemented.');
}

View File

@ -70,7 +70,7 @@ class FilePickerIO extends FilePicker {
bool? withReadStream,
) async {
final String type = describeEnum(fileType);
if (type != FileType.custom && (allowedExtensions?.isNotEmpty ?? false)) {
if (type != 'custom' && (allowedExtensions?.isNotEmpty ?? false)) {
throw Exception(
'You are setting a type [$fileType]. Custom extension filters are only allowed with FileType.custom, please change it or remove filters.');
}

View File

@ -1,7 +1,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 extension filtering support.
homepage: https://github.com/miguelpruivo/plugins_flutter_file_picker
version: 3.0.2
version: 3.0.2+2
dependencies:
flutter: