Fixes an issue on iOS 14, where canceling with swipe gestures, could result in cancel event not being dispatched.
This commit is contained in:
Miguel Ruivo 2020-10-19 21:04:37 +01:00
parent b2668dbbd0
commit a4d5478669
4 changed files with 10 additions and 3 deletions

View File

@ -1,3 +1,6 @@
## 2.0.8
Fixes an issue on iOS 14, where canceling with swipe gestures, could result in cancel event not being dispatched. ([#431](https://github.com/miguelpruivo/flutter_file_picker/issues/431)).
## 2.0.7
Fixes [#425](https://github.com/miguelpruivo/flutter_file_picker/issues/425) and updates iOS to use NSDocumentDirectory on iOS 12 or lower. Thanks @allanwolski.

View File

@ -126,7 +126,7 @@ class _FilePickerDemoState extends State<FilePickerDemo> {
child: _pickingType == FileType.custom
? TextFormField(
maxLength: 15,
autovalidate: true,
autovalidateMode: AutovalidateMode.always,
controller: _controller,
decoration:
InputDecoration(labelText: 'File extension'),

View File

@ -148,7 +148,11 @@
PHPickerViewController *pickerViewController = [[PHPickerViewController alloc] initWithConfiguration:config];
pickerViewController.delegate = self;
[self.viewController presentViewController:pickerViewController animated:YES completion:nil];
[self.viewController presentViewController:pickerViewController animated:YES completion:^{
Log(@"Media picker canceled");
self->_result(nil);
self->_result = nil;
}];
return;
}
#endif

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.7
version: 2.0.8
dependencies:
flutter: