-
Notifications
You must be signed in to change notification settings - Fork 9.8k
[image_picker_for_web] Migrate image_picker to package:cross_file #4083
Conversation
…nce it gets published.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Let's go! The platform_interface has been published here: https://pub.dev/packages/image_picker_platform_interface/changelog#220 |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@BeMacized, I've brought the branch up to date with the latest There's documentation linked in the new README files, but TL;DR, this is how tests can be run now:
And this is the output:
Let me know if you can run the tests (or not!) and if the code changes make sense to you! Then we can wrap this up and get it ready to be merged! |
Just verified that tests are running in CI. See this run, for example. |
@ditman Alright! I can confirm the tests succeed locally as well, so I've marked this PR as ready for review. |
final objectUrl = _handleOnChangeEvent(event); | ||
if (!_completer.isCompleted && objectUrl != null) { | ||
_completer.complete(XFile(objectUrl)); | ||
} |
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.
Let's extract the name on disk of the file from this event
so we can initialize the XFile with it! (to fix flutter/flutter#58764)
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.
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.
We'll leave the name/length extraction for v2.1.1, so we can finish this migration without too much feature creep.
…utter#4083) * Migrate image picker platform interface to cross_file * Port tests from --platform=chrome to integration_test Co-authored-by: David Iglesias Teixeira <[email protected]>
* upstream_master: (40 commits) [image_picker] Image picker fix camera device (flutter#3898) [flutter_plugin_tools] Improve license-check output (flutter#4154) [webview_flutter] Fix broken keyboard issue link (flutter#3266) [flutter_plugin_tools] Support format on Windows (flutter#4150) [flutter_plugin_tools] Make unit tests pass on Windows (flutter#4149) [image_picker_for_web] Migrate image_picker to package:cross_file (flutter#4083) [various] Prepare plugin repo for binding API improvements (flutter#4148) [quick_actions] Add const constructor (flutter#4131) [in_app_purchase] Add iOS currency symbol to ProductDetails (flutter#4144) [in_app_purchase] Added priceCurrencySymbol to SkuDetailsWrapper (flutter#4114) [image_picker_platform_interface] Add methods that return package:cross_file (flutter#4072) [flutter_plugin_tools] Improve and test 'format' (flutter#4145) [flutter_plugin_tools] Only check target packages in analyze (flutter#4146) [in_app_purchase] Fix crash when retrieveReceiptWithError gives an error. (flutter#4138) [video_player] Pause video when it completes (flutter#3727) [in_app_purchase] Add currencySymbol to ProductDetails (flutter#4115) [in_app_purchase] Add documentation for price change confirmations (flutter#4092) [camera] android-rework part 8: Supporting modules for final implementation (flutter#4054) [plugin_platform_interface] Fix README broken link (flutter#4143) [various] Prepare plugin repo for binding API improvements (flutter#4137) ...
…utter#4083) * Migrate image picker platform interface to cross_file * Port tests from --platform=chrome to integration_test Co-authored-by: David Iglesias Teixeira <[email protected]>
Changed all usages of PickedFile to XFile, to follow the changes made to the platform interface (#4072)
This PR will remain in draft state until the platform interface changes have been merged and published (#4072), so that the pubspec can be updated properly.
Relevant issue:
Pre-launch Checklist
dart format
.)[shared_preferences]
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.