-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Description
After flutter/engine#54981 landed we experienced customer testing failures in Zulip so it had to be reverted. Now that dart:ui color is defined as floating-point numbers the isSameColorAs should be used for testing Color equality in tests.
Here's an example where I had to do that in the framework: https://github.com/flutter/flutter/pull/154752/files#diff-5e57f7f8adbaec70bf92aeb1da7f5b86d3f3f7b1239739f76b50615f09187015R197
This one is tricky because it looks like the difference in the floating point numbers is < 0.0001 which means it doesn't show up in the print statements. I'm not sure if there is a good remedy for that.
Please update the asserts or the customer test will be disabled in 72 hours (as per our SLA).
Thanks @chrisbobbe, sorry this popping up now. FWIW this is my last planned change to dart:ui Color for this feature.