drop image package dependency for goldens#54144
Conversation
|
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat. Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
1b5a57a to
6baa5c6
Compare
Piinks
left a comment
There was a problem hiding this comment.
It looks like the flutter_goldens package will need to be updated as well.
Piinks
left a comment
There was a problem hiding this comment.
It appears that local output is broken in this current state.
I manipulated an existing golden file in the framework and ran it locally. Here is the difference between what is currently on master and this change. I changed the background of the image to trigger the failure:
| Master | #54144 | |
|---|---|---|
| master image | ![]() |
![]() |
| test image | ![]() |
![]() |
| isolated diff | ![]() |
![]() |
| masked diff | ![]() |
![]() |
I am going to see if I can write a test that would catch this, since all of the current tests are passing. It seems to me that this may be just be the invert function getting the wrong pixel.
|
The invert function was definitely broken 🤦♂, it should be good to go now. |
|
hmm, I wrote a test using the images you provided above and it is not passing - I will continue digging here. |
|
HAH! I think I found out the reason. The |
Ah! 😆 I scratching my head over this, brilliant! |
|
I warned you I probably did things wrong! 🤣 |
|
Just checked against the test I uploaded above. Looks like it works now! 🎉 |
Co-Authored-By: Kate Lovett <katelovett@google.com>









Description
Fixes #39152.
Uses the
Imageobject from dart:ui to endcode/decode the pngs instead of the image package.Related Issues
#39152
Tests
I did not add new tests, the existing test coverage should be sufficient.
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 --flutter-repo) does not report any problems on my PR.Breaking Change
Did any tests fail when you ran them? Please read Handling breaking changes.