Updates iOS picker presentation (#813) and fixes import regression on web (#746)

master
Miguel Ruivo 1 year ago
parent 2cd8dcabbe
commit 267cc12caa
  1. 1
      .gitignore
  2. 11
      CHANGELOG.md
  3. 3
      example/lib/generated_plugin_registrant.dart
  4. 6
      ios/Classes/FilePickerPlugin.m
  5. 0
      lib/_internal/file_picker_web.dart
  6. 4
      lib/src/file_picker_result.dart
  7. 4
      lib/src/platform_file.dart
  8. 6
      pubspec.yaml

1
.gitignore vendored

@ -34,3 +34,4 @@ example/ios/Flutter/flutter_export_environment.sh
example/.flutter-plugins-dependencies
file_picker/example/.flutter-plugins-dependencies
file_picker/example/ios/Flutter/flutter_export_environment.sh
example/macos

@ -1,5 +1,12 @@
## 4.0.0+1
Overrides equality and toString for `platform_file` and `file_picker_result` for better comparison different results.
## 4.0.1
##### General
Overrides equality and toString for `platform_file` and `file_picker_result` for better comparison different results. Thank you @Nolence.
##### iOS
- Changes the presentation type of the picker from `UIModalPresentationCurrentContext` to `UIModalPresentationAutomatic` ([#813](https://github.com/miguelpruivo/flutter_file_picker/issues/813)).
##### Web
- Fixes regression of [#746](https://github.com/miguelpruivo/flutter_file_picker/issues/746).
- Updates exception text when trying to access `path` on Web. Thank you @maxzod.
## 4.0.0
### Desktop support added for all platforms (MacOS, Linux & Windows) ([#271](https://github.com/miguelpruivo/flutter_file_picker/issues/271)) 🎉

@ -2,10 +2,9 @@
// Generated file. Do not edit.
//
// ignore_for_file: directives_ordering
// ignore_for_file: lines_longer_than_80_chars
import 'package:file_picker/src/file_picker_web.dart';
import 'package:file_picker/_internal/file_picker_web.dart';
import 'package:flutter_web_plugins/flutter_web_plugins.dart';

@ -134,7 +134,6 @@
}
self.documentPickerController.delegate = self;
self.documentPickerController.modalPresentationStyle = UIModalPresentationCurrentContext;
self.galleryPickerController.allowsEditing = NO;
[self.viewController presentViewController:self.documentPickerController animated:YES completion:nil];
@ -157,7 +156,6 @@
PHPickerViewController *pickerViewController = [[PHPickerViewController alloc] initWithConfiguration:config];
pickerViewController.delegate = self;
pickerViewController.modalPresentationStyle = UIModalPresentationCurrentContext;
[self.viewController presentViewController:pickerViewController animated:YES completion:nil];
return;
}
@ -173,7 +171,6 @@
self.galleryPickerController = [[UIImagePickerController alloc] init];
self.galleryPickerController.delegate = self;
self.galleryPickerController.modalPresentationStyle = UIModalPresentationCurrentContext;
self.galleryPickerController.videoQuality = UIImagePickerControllerQualityTypeHigh;
switch (type) {
@ -222,7 +219,7 @@
if (@available(iOS 11.0, *)) {
DKImageAssetExporterConfiguration * exportConfiguration = [[DKImageAssetExporterConfiguration alloc] init];
exportConfiguration.imageExportPreset = allowCompression ? UIImagePickerControllerImageURLExportPresetCompatible : UIImagePickerControllerImageURLExportPresetCurrent;
exportConfiguration.imageExportPreset = allowCompression ? DKImageExportPresentCompatible : DKImageExportPresentCurrent;
exportConfiguration.videoExportPreset = allowCompression ? AVAssetExportPresetHighestQuality : AVAssetExportPresetPassthrough;
dkImagePickerController.exporter = [dkImagePickerController.exporter initWithConfiguration:exportConfiguration];
}
@ -284,7 +281,6 @@
self.audioPickerController.delegate = self;
self.audioPickerController.showsCloudItems = YES;
self.audioPickerController.allowsPickingMultipleItems = isMultiPick;
self.audioPickerController.modalPresentationStyle = UIModalPresentationCurrentContext;
[self.viewController presentViewController:self.audioPickerController animated:YES completion:nil];
}

@ -31,7 +31,9 @@ class FilePickerResult {
@override
bool operator ==(Object other) {
if (identical(this, other)) return true;
if (identical(this, other)) {
return true;
}
return other is FilePickerResult && listEquals(other.files, files);
}

@ -62,7 +62,9 @@ class PlatformFile {
@override
bool operator ==(Object other) {
if (identical(this, other)) return true;
if (identical(this, other)) {
return true;
}
return other is PlatformFile &&
other.path == path &&

@ -3,7 +3,7 @@ description: A package that allows you to use a native file explorer to pick sin
homepage: https://github.com/miguelpruivo/plugins_flutter_file_picker
repository: https://github.com/miguelpruivo/flutter_file_picker
issue_tracker: https://github.com/miguelpruivo/flutter_file_picker/issues
version: 4.0.0+1
version: 4.0.1
dependencies:
flutter:
@ -30,10 +30,10 @@ flutter:
pluginClass: FilePickerPlugin
web:
pluginClass: FilePickerWeb
fileName: src/file_picker_web.dart
fileName: _internal/file_picker_web.dart
macos:
default_package: file_picker
windows:
default_package: file_picker
linux:
default_package: file_picker
default_package: file_picker

Loading…
Cancel
Save