Rollsback allowCompression from file_picker_interface

This commit is contained in:
Miguel Ruivo 2020-07-23 15:42:00 +01:00
parent fdd19f7006
commit 35a5dcbbbc
7 changed files with 9 additions and 20 deletions

2
.gitignore vendored
View File

@ -32,3 +32,5 @@ build/
.flutter-plugins
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

View File

@ -1 +0,0 @@
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"file_picker","path":"/Users/miguelruivo/Personal/plugins/flutter_file_picker/file_picker/","dependencies":[]}],"android":[{"name":"file_picker","path":"/Users/miguelruivo/Personal/plugins/flutter_file_picker/file_picker/","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"flutter_plugin_android_lifecycle","path":"/Users/miguelruivo/devtools/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_plugin_android_lifecycle-1.0.6/","dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[{"name":"file_picker_web","path":"/Users/miguelruivo/devtools/flutter/.pub-cache/hosted/pub.dartlang.org/file_picker_web-1.0.0/","dependencies":[]}]},"dependencyGraph":[{"name":"file_picker","dependencies":["flutter_plugin_android_lifecycle","file_picker_web"]},{"name":"file_picker_web","dependencies":[]},{"name":"flutter_plugin_android_lifecycle","dependencies":[]}],"date_created":"2020-06-11 19:26:41.155074","version":"1.17.3"}

View File

@ -1,12 +0,0 @@
#!/bin/sh
# This is a generated file; do not edit or check into version control.
export "FLUTTER_ROOT=/Users/miguelruivo/devtools/flutter"
export "FLUTTER_APPLICATION_PATH=/Users/miguelruivo/Personal/plugins/flutter_file_picker/file_picker/example"
export "FLUTTER_TARGET=/Users/miguelruivo/Personal/plugins/flutter_file_picker/file_picker/example/lib/main.dart"
export "FLUTTER_BUILD_DIR=build"
export "SYMROOT=${SOURCE_ROOT}/../build/ios"
export "OTHER_LDFLAGS=$(inherited) -framework Flutter"
export "FLUTTER_FRAMEWORK_DIR=/Users/miguelruivo/devtools/flutter/bin/cache/artifacts/engine/ios"
export "FLUTTER_BUILD_NAME=1.0.0"
export "FLUTTER_BUILD_NUMBER=1"
export "TRACK_WIDGET_CREATION=true"

View File

@ -1,4 +1,8 @@
## [1.3.0] - Adds FilePickerStatus
## [1.3.1] - Rollback `allowCompression`
Removes `allowCompression` from interface as it should only be used from `file_picker` (Android & iOS).
## [1.3.0] - Adds `allowCompression` parameter
Adds `allowCompression` that will allow developers to set whether the picked media files (image/video) can be automatically compressed by OS or not. Defaults to `true`.

View File

@ -47,9 +47,6 @@ abstract class FilePickerPlatform extends PlatformInterface {
/// cached (particularly those picked from cloud providers), you may want to set [onFileLoading] handler
/// that will give you the current status of picking.
///
/// If you plan on picking images/videos and don't want them to be compressed automatically by OS,
/// you should set [allowCompression] to `false`.
///
/// Allows `dynamic` return as files may be resolved to different types, based
/// on each platform implementation. For example, when using _dart:html_ with Flutter Web
/// or _dart:io_ with Flutter, different `File` instances could be used.
@ -57,7 +54,6 @@ abstract class FilePickerPlatform extends PlatformInterface {
FileType type = FileType.any,
List<String> allowedExtensions,
bool allowMultiple = false,
bool allowCompression = true,
Function(FilePickerStatus) onFileLoading,
}) async =>
throw UnimplementedError('getFiles() has not been implemented.');

View File

@ -1,7 +1,7 @@
name: file_picker_platform_interface
description: A common platform interface for the file_picker plugin that must be used to share commom features
homepage: https://github.com/miguelpruivo/plugins_flutter_file_picker/file_picker_platform_interface
version: 1.3.0
version: 1.3.1
environment:
sdk: ">=2.1.0 <3.0.0"

View File

@ -8,7 +8,7 @@ environment:
flutter: ">=1.10.0"
dependencies:
file_picker_platform_interface: ^1.2.0
file_picker_platform_interface: ^1.3.0
flutter:
sdk: flutter
flutter_web_plugins: