-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Add some sanity to the ImageStream listener API #32936
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hixie
reviewed
May 17, 2019
Hixie
reviewed
May 17, 2019
Hixie
reviewed
May 17, 2019
Hixie
reviewed
May 17, 2019
Contributor
|
Your claim that this is not a breaking change is entertaining. :-P The direction looks good. cc @xster who wrote this initially. |
9 tasks
goderbauer
approved these changes
May 20, 2019
Member
goderbauer
left a comment
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.
LGTM
The current API was broken in that you registered multiple callbacks at once, but when you removed listeners, only the primary listener was used to determine what was removed. This led to unintuitive cases where the caller could get unexpected behavior. This updates the API to add and remove listeners using a newly introduced [ImageStreamListener] object, a value object that has references to the individual callbacks that may fire. #24722 #32374 #32935
mollywoodnini
added a commit
to mollywoodnini/flutter_plugin_pdf_viewer
that referenced
this pull request
May 22, 2019
updated listener handling due to new flutter version: flutter/flutter#32936
DavBfr
added a commit
to DavBfr/dart_pdf
that referenced
this pull request
May 28, 2019
amirh
added a commit
to amirh/plugins
that referenced
this pull request
May 28, 2019
This updates the sample to adapt to the ImageStream listener API changes in flutter/flutter#32936 As we cannot use the new API before it makes it to stable I'm commenting out the sample for now(if we update it now it won't compile on stable, and if we leave it as is it breaks CI on master).
amirh
added a commit
to amirh/plugins
that referenced
this pull request
May 28, 2019
This updates the sample to adapt to the ImageStream listener API changes in flutter/flutter#32936 As we cannot use the new API before it makes it to stable I'm commenting out the sample for now(if we update it now it won't compile on stable, and if we leave it as is it breaks CI on master).
Merged
13 tasks
amirh
added a commit
to flutter/plugins
that referenced
this pull request
May 28, 2019
…mple. (#1640) This updates the sample to adapt to the ImageStream listener API changes in flutter/flutter#32936 As we cannot use the new API before it makes it to stable I'm commenting out the sample for now(if we update it now it won't compile on stable, and if we leave it as is it breaks CI on master).
13 tasks
amirh
added a commit
to flutter/plugins
that referenced
this pull request
May 28, 2019
This updates the sample to adapt to the ImageStream listener API changes in flutter/flutter#32936 This is similar to the change we did to Google Maps in #1640, unfortunately in the firebase_ml_vision case where we commented out the sample that used the ImageStream listener API. Unfortunately in the firebase_ml_vision case, there's no point in the sample without the ImageStream listener(you need it to pick an image), so I'm just updating the sample to the new API knowing that it won't compile on stable until the breaking change makes it there.
DavBfr
added a commit
to DavBfr/dart_pdf
that referenced
this pull request
Jun 15, 2019
DavBfr
added a commit
to DavBfr/dart_pdf
that referenced
this pull request
Jun 15, 2019
collinjackson
pushed a commit
to collinjackson/flutterfire-old2
that referenced
this pull request
Jun 24, 2019
This updates the sample to adapt to the ImageStream listener API changes in flutter/flutter#32936 This is similar to the change we did to Google Maps in #1640, unfortunately in the firebase_ml_vision case where we commented out the sample that used the ImageStream listener API. Unfortunately in the firebase_ml_vision case, there's no point in the sample without the ImageStream listener(you need it to pick an image), so I'm just updating the sample to the new API knowing that it won't compile on stable until the breaking change makes it there.
DavBfr
added a commit
to DavBfr/dart_pdf
that referenced
this pull request
Jul 11, 2019
collinjackson
pushed a commit
to firebase/flutterfire
that referenced
this pull request
Aug 14, 2019
This updates the sample to adapt to the ImageStream listener API changes in flutter/flutter#32936 This is similar to the change we did to Google Maps in #1640, unfortunately in the firebase_ml_vision case where we commented out the sample that used the ImageStream listener API. Unfortunately in the firebase_ml_vision case, there's no point in the sample without the ImageStream listener(you need it to pick an image), so I'm just updating the sample to the new API knowing that it won't compile on stable until the breaking change makes it there.
1 task
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
The current API was broken in that you registered multiple
callbacks at once, but when you removed listeners, only the
primary listener was used to determine what was removed.
This led to unintuitive cases where the caller could get
unexpected behavior.
This updates the API to add and remove listeners using a
newly introduced [ImageStreamListener] object, a value
object that has references to the individual callbacks that
may fire.
Related Issues
Tests
I updated all affected tests to match the new API/behavior.
Checklist
///).flutter analyze --flutter-repo) does not report any problems on my PR.Breaking Change
Does your PR require Flutter developers to manually update their apps to accommodate your change?