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

[image_picker_platform_interface] use XFile instead of PickedFile #3388

Conversation

balvinderz
Copy link
Contributor

@balvinderz balvinderz commented Jan 5, 2021

Description

In this PR, i have migrated the image_picker_platform_interface to use XFile instead of PickedFile. In further PRs i will migrate the image_picker and image_picker_web to use XFile also. This will allow users to get the length of the file(flutter/flutter#58764) and name of the file(#2802 (comment)) .

Related Issues

flutter/flutter#58764 flutter/flutter#70886

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?

  • Yes, this is a breaking change (please indicate a breaking change in CHANGELOG.md and increment major revision).
  • No, this is not a breaking change.

@balvinderz
Copy link
Contributor Author

@ditman Can you please review this

Copy link
Member

@ditman ditman left a comment

Choose a reason for hiding this comment

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

I'll let people on the team know tomorrow that this change is incoming. Please address the comments below, if you can!

Also, the format precheck is not passing because of the following file:

These files are not formatted correctly (see diff below):
  image_picker/image_picker_platform_interface/lib/image_picker_platform_interface.dart

You should be able to run dartfmt -w lib/image_picker_platform_interface.dart to have the dartfmt tool automatically correct the above for you.

@balvinderz balvinderz requested a review from ditman January 6, 2021 04:45
@ditman
Copy link
Member

ditman commented Jan 14, 2021

@balvinderz this looks good, but I think the team prefers a backwards-compatible version (keeping the old features, and adding new methods for the new features) instead of a major version bump. I'll verify this tomorrow, and if so, I'll do the necessary changes in this PR. Thank you very much for the contribution!

@ditman
Copy link
Member

ditman commented Jan 29, 2021

@balvinderz migrating the platform_interface package to null-safety (in a backwards-compatible way) has taken a higher priority than landing this feature, so the team has decided to work on that first.

Thank you very much for your effort with this PR, but we can't work on merging this PR right now. I'll close this PR, and once the null safety migration is complete, we can revisit this, or maybe re-do it in the new null-safe code. Otherwise, the PR will take too much work to keep rebased.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants