-
Notifications
You must be signed in to change notification settings - Fork 9.8k
[image_picker_platform_interface] use XFile instead of PickedFile #3388
[image_picker_platform_interface] use XFile instead of PickedFile #3388
Conversation
@ditman Can you please review this |
There was a problem hiding this 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.
...picker/image_picker_platform_interface/lib/src/platform_interface/image_picker_platform.dart
Outdated
Show resolved
Hide resolved
packages/image_picker/image_picker_platform_interface/lib/src/types/picked_file/lost_data.dart
Show resolved
Hide resolved
packages/image_picker/image_picker_platform_interface/pubspec.yaml
Outdated
Show resolved
Hide resolved
packages/image_picker/image_picker_platform_interface/pubspec.yaml
Outdated
Show resolved
Hide resolved
packages/image_picker/image_picker_platform_interface/test/picked_file_html_test.dart
Outdated
Show resolved
Hide resolved
@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! |
@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. |
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.///
).flutter analyze
) does not report any problems on my PR.Breaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?