- Fixes an issue that could result in some files not being properly retrieved due to special characters on their names. ([#472](https://github.com/miguelpruivo/flutter_file_picker/issues/472));
- Fixes a NPE that could happen with some devices. ([#482](https://github.com/miguelpruivo/flutter_file_picker/issues/482));
This commit is contained in:
Miguel Ruivo 2020-11-04 18:25:05 +00:00
parent 0fa01bb74a
commit 7f8d801a81
4 changed files with 13 additions and 12 deletions

View File

@ -1,3 +1,10 @@
## 2.0.12
Android:
- Fixes an issue that could result in some files not being properly retrieved due to special characters on their names. ([#472](https://github.com/miguelpruivo/flutter_file_picker/issues/472)).
- Fixes a NPE that could happen with some devices. ([#482](https://github.com/miguelpruivo/flutter_file_picker/issues/482)).
## 2.0.11
iOS: Fixes `FileType.audio` exports to support ipod-library content (non DRM protected). From now on, a cached asset (m4a) will be exported from the selected music file in the Music app, so it can later be used. Fixes ([#441](https://github.com/miguelpruivo/flutter_file_picker/issues/441)).

View File

@ -283,13 +283,15 @@ public class FilePickerPlugin implements MethodChannel.MethodCallHandler, Flutte
this.activityBinding.removeActivityResultListener(this.delegate);
this.activityBinding.removeRequestPermissionsResultListener(this.delegate);
this.activityBinding = null;
this.lifecycle.removeObserver(this.observer);
if(this.observer != null) {
this.lifecycle.removeObserver(this.observer);
this.application.unregisterActivityLifecycleCallbacks(this.observer);
}
this.lifecycle = null;
this.delegate.setEventHandler(null);
this.delegate = null;
this.channel.setMethodCallHandler(null);
this.channel = null;
this.application.unregisterActivityLifecycleCallbacks(this.observer);
this.application = null;
}

View File

@ -84,15 +84,7 @@ public class FileUtils {
}
}
if (uri.getPath() != null) {
result = uri.getPath();
final int cut = result.lastIndexOf('/');
if (cut != -1) {
result = result.substring(cut + 1);
}
}
return result;
return uri.toString();
}
public static boolean clearCache(final Context context) {

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: 2.0.11
version: 2.0.12
dependencies:
flutter: