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

[image_picker_for_web] Support multiple pick. Store name and other local file properties in XFile. #4166

Merged

Conversation

balvinderz
Copy link
Contributor

@balvinderz balvinderz commented Jul 19, 2021

Add support for picking multiple image , and store name and other properties in XFile

Fixes flutter/flutter#86525
Fixes flutter/flutter#58764

If you had to change anything in the flutter/tests repo, include a link to the migration guide as per the breaking change policy.

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the relevant style guides and ran the auto-formatter. (Note that unlike the flutter/flutter repo, the flutter/plugins repo does use dart format.)
  • I signed the CLA.
  • The title of the PR starts with the name of the plugin surrounded by square brackets, e.g. [shared_preferences]
  • I listed at least one issue that this PR fixes in the description above.
  • 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 updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test exempt.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@balvinderz
Copy link
Contributor Author

@ditman can you please review this

@ditman ditman self-requested a review July 19, 2021 19:02
@ditman
Copy link
Member

ditman commented Jul 19, 2021

Ohhh, thanks @balvinderz! Definitely a very requested feature! Thanks for the contribution, I'll review right away!

@ditman
Copy link
Member

ditman commented Jul 19, 2021

(Check file_selector_web, btw, there's probably a good example there!)

@ditman
Copy link
Member

ditman commented Jul 19, 2021

Tests are failing with:

LateInitializationError: Field 'getMultipleFilesFromInput' has not been initialized.

Please run the tests in your machine ;)

@balvinderz balvinderz requested a review from ditman July 19, 2021 19:46
@ditman
Copy link
Member

ditman commented Jul 19, 2021

This is looking great! I'll give this a quick test in my box and have it ready to merge by EOD. Thanks for the contribution @balvinderz! Keep them coming!

* Removed redundant getFile method (getFiles already exists)
* Added tests to verify that 'multiple' attribute is set in file input
* Added tests to verify that extra metadata is set.
* Added some , to improve dart format output.
@google-cla

This comment has been minimized.

@google-cla google-cla bot added cla: no and removed cla: yes labels Jul 19, 2021
@ditman

This comment has been minimized.

@google-cla google-cla bot added cla: yes and removed cla: no labels Jul 19, 2021
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.

LGTM! I've tested this in Chrome Linux and it seems to work as expected. Has tests for the initialization of the new attributes. 🚀

@ditman ditman added the waiting for tree to go green (Use "autosubmit") This PR is approved and tested, but waiting for the tree to be green to land. label Jul 19, 2021
@ditman ditman changed the title [image_picker_for_web] Add support for picking multiple image , and store name and other properties in XFile [image_picker_for_web] Support multiple pick. Store name and other local file properties in XFile. Jul 20, 2021
@fluttergithubbot fluttergithubbot merged commit 036fb33 into flutter:master Jul 20, 2021
@ditman
Copy link
Member

ditman commented Jul 20, 2021

Published: https://pub.dev/packages/image_picker_for_web/changelog#211

engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jul 27, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jul 27, 2021
fotiDim pushed a commit to fotiDim/plugins that referenced this pull request Sep 13, 2021
amantoux pushed a commit to amantoux/plugins that referenced this pull request Sep 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes p: image_picker platform-web waiting for tree to go green (Use "autosubmit") This PR is approved and tested, but waiting for the tree to be green to land.
Projects
None yet
3 participants