Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

[image_picker_platform_interface] Introduce new PickedFile APIs. #2791

Merged
merged 7 commits into from
May 26, 2020

Conversation

ditman
Copy link
Member

@ditman ditman commented May 21, 2020

Description

This change modifies the platform_interface to introduce the PickedFile type and the new APIs that make use of it.

This also deprecates the old APIs, pointing people to the new ones.

This is the first step to release #2767

Related Issues

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • My PR includes unit or integration tests for all changed/updated/fixed behaviors (See Contributor Guide).
  • All existing and new tests are passing.
  • I updated/added relevant documentation (doc comments with ///).
  • The analyzer (flutter analyze) does not report any problems on my PR.
  • I read and followed the Flutter Style Guide.
  • The title of the PR starts with the name of the plugin surrounded by square brackets, e.g. [shared_preferences]
  • I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy.
  • I updated CHANGELOG.md to add a description of the change.
  • I signed the CLA.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Does your PR require plugin users to manually update their apps to accommodate your change?

  • No, this is not a breaking change.

Note: this is not a breaking change, but it requires users to migrate to non-deprecated methods.

@ditman ditman requested a review from cyanglaz May 21, 2020 20:57
@ditman ditman self-assigned this May 21, 2020
@googlebot
Copy link

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@rodydavis
Copy link
Contributor

@googlebot I consent.

@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

Copy link
Contributor

@cyanglaz cyanglaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!


/// Synchronously read the entire file contents as a string using the given [Encoding].
///
/// Throws Exception if the operation fails.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's also mention the default encoding

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You got it. I'll add the comment that it defaults to UTF8 and merge after this all goes green again.

@ditman ditman merged commit b781ce9 into flutter:master May 26, 2020
@ditman ditman deleted the image-picker-platform-interface branch May 26, 2020 19:53
EdwinRomelta pushed a commit to EdwinRomelta/plugins that referenced this pull request Jun 11, 2020
…tter#2791)

* Make API Async, so web can use objectUrls internally, instead of bytes.
* Introduce the PickedFile class to have a more platform agnostic return.
* Modify the platform interface to return PickedFiles.

Run tests with flutter test / flutter test --platform chrome

Co-authored-by: Rody Davis <rody.davis.jr@gmail.com>
jorgefspereira pushed a commit to jorgefspereira/plugins_flutter that referenced this pull request Oct 10, 2020
…tter#2791)

* Make API Async, so web can use objectUrls internally, instead of bytes.
* Introduce the PickedFile class to have a more platform agnostic return.
* Modify the platform interface to return PickedFiles.

Run tests with flutter test / flutter test --platform chrome

Co-authored-by: Rody Davis <rody.davis.jr@gmail.com>
FlutterSu pushed a commit to FlutterSu/flutter-plugins that referenced this pull request Nov 20, 2020
…tter#2791)

* Make API Async, so web can use objectUrls internally, instead of bytes.
* Introduce the PickedFile class to have a more platform agnostic return.
* Modify the platform interface to return PickedFiles.

Run tests with flutter test / flutter test --platform chrome

Co-authored-by: Rody Davis <rody.davis.jr@gmail.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants