-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[image_picker_for_web] migrates to package:web #5799
[image_picker_for_web] migrates to package:web #5799
Conversation
...es/image_picker/image_picker_for_web/example/integration_test/image_picker_for_web_test.dart
Outdated
Show resolved
Hide resolved
...es/image_picker/image_picker_for_web/example/integration_test/image_picker_for_web_test.dart
Outdated
Show resolved
Hide resolved
…web' into migrate_image_picker_to_package_web
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.
PTAL @tarrinneal, I think I addressed all my own concerns haha!
(I tried compiling the example app to Wasm, but it depends on |
packages/image_picker/image_picker_for_web/lib/image_picker_for_web.dart
Show resolved
Hide resolved
packages/image_picker/image_picker_for_web/lib/image_picker_for_web.dart
Show resolved
Hide resolved
packages/image_picker/image_picker_for_web/lib/image_picker_for_web.dart
Outdated
Show resolved
Hide resolved
/// Converts a [web.FileList] into a [List] of [web.File]. | ||
/// | ||
/// This method makes a copy. | ||
List<web.File> get toList => |
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.
meh...I'd opt for a function here. But maybe that's just my preference.
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 hope this eventually gets provided by package:web, as some form of iterable thing, so I don't need any of my code :P
packages/image_picker/image_picker_for_web/lib/image_picker_for_web.dart
Show resolved
Hide resolved
packages/image_picker/image_picker_for_web/lib/image_picker_for_web.dart
Outdated
Show resolved
Hide resolved
packages/image_picker/image_picker_for_web/lib/src/image_resizer.dart
Outdated
Show resolved
Hide resolved
final Completer<List<XFile>> completer = Completer<List<XFile>>(); | ||
// Observe the input until we can return something | ||
input.onChange.first.then((html.Event event) { | ||
final List<html.File>? files = _handleOnChangeEvent(event); | ||
input.onchange = (web.Event event) { |
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.
Use the streams, not the listeners directly.
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.
Created an issue for this, the onCancel
stream doesn't exist and seems that cannot be easily created: dart-lang/web#199
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.
Adding 2nd approval.
flutter/packages@2aa6e3f...9b88dbc 2024-03-06 balvindersi2@gmail.com [image_picker_for_web] migrates to package:web (flutter/packages#5799) 2024-03-06 balvindersi2@gmail.com [video_player_web] migrates to package:web (flutter/packages#5800) 2024-03-06 49699333+dependabot[bot]@users.noreply.github.com [in_app_pur]: Bump org.json:json from 20240205 to 20240303 in /packages/in_app_purchase/in_app_purchase/example/android/app (flutter/packages#6253) 2024-03-05 ian@hixie.ch [rfw] Change test coverage logic to enforce 100% coverage (flutter/packages#6272) 2024-03-05 louisehsu@google.com [in_app_purchase_storekit] backfill native tests for more complete test coverage (flutter/packages#6209) 2024-03-05 stuartmorgan@google.com [tool] Add features to support GCB auto-publish flow (flutter/packages#6218) 2024-03-05 ditman@gmail.com [web] Use TrustedTypes from pkg web. (flutter/packages#6273) 2024-03-05 engine-flutter-autoroll@skia.org Roll Flutter from 65cd84b to 3b5a2ec (26 revisions) (flutter/packages#6269) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC flutter-ecosystem@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Updates the web implementation of `image_picker_for_web` to `package:web`. ### Issues * Fixes flutter/flutter#139751
Updates the web implementation of `image_picker_for_web` to `package:web`. ### Issues * Fixes flutter/flutter#139751
Updates the web implementation of
image_picker_for_web
topackage:web
.Issues
Pre-launch Checklist
dart format
.)[shared_preferences]
pubspec.yaml
with an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.CHANGELOG.md
to add a description of the change, following repository CHANGELOG style.///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.