AnimationStyle methods#182333
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a merge() method to AnimationStyle and improves the lerp() method to provide accurate interpolation. The changes look good, but I've found a couple of areas for improvement. The documentation for the new merge() method is a bit confusing and could be clarified. More importantly, the new lerp() implementation doesn't handle null values correctly, leading to jumps instead of smooth interpolation. I've provided suggestions to fix this and to add a test case to cover this scenario.
766475f to
98a3407
Compare
|
Golden file changes have been found for this pull request. Click here to view and triage (e.g. because this is an intentional change). If you are still iterating on this change and are not ready to resolve the images on the Flutter Gold dashboard, consider marking this PR as a draft pull request above. You will still be able to view image results on the dashboard, commenting will be silenced, and the check will not try to resolve itself until marked ready for review. For more guidance, visit Writing a golden file test for Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
37540b1 to
c951cf0
Compare
|
@nate-thegrate it looks like some of the feedback that was addressed, was reverted in code? |
c951cf0 to
d40b6c4
Compare
|
@navaronbracke my bad! I forgot to pull the changes from your suggestions before applying Victor's advice and force-pushing. Should be fixed now. |
justinmc
left a comment
There was a problem hiding this comment.
LGTM, let's see if the Google tests pass.
justinmc
left a comment
There was a problem hiding this comment.
LGTM again after the merge.
589fb32 to
db043bb
Compare
flutter/flutter@31f1802...8e8a194 2026-04-17 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Fix ImageInfo.isCloneOf to correctly compare scale values (fixes #184626) (#184643)" (flutter/flutter#185203) 2026-04-17 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Roll Fuchsia Test Scripts from R2EllDf4DgBXVNuiN... to dQ4PjIJB5kZFU8Y32... (#185192)" (flutter/flutter#185199) 2026-04-17 chris@bracken.jp [iOS] Migrate FlutterLaunchEngine to Swift (flutter/flutter#185151) 2026-04-17 116356835+AbdeMohlbi@users.noreply.github.com Remove unused `FlutterRunArguments.java` file (flutter/flutter#184160) 2026-04-17 engine-flutter-autoroll@skia.org Roll Fuchsia Test Scripts from R2EllDf4DgBXVNuiN... to dQ4PjIJB5kZFU8Y32... (flutter/flutter#185192) 2026-04-17 pewpewstol@gmail.com [Impeller] Fix morphology filter asymmetric dilation/erosion (flutter/flutter#184913) 2026-04-17 nate.w5687@gmail.com `AnimationStyle` methods (flutter/flutter#182333) 2026-04-17 karan@solvejet.net Fix _scheduleSystemFontsUpdate assertion during non-idle scheduler phase (flutter/flutter#184332) 2026-04-17 154381524+flutteractionsbot@users.noreply.github.com Revert "Unpin sdk package dependencies" (flutter/flutter#185186) 2026-04-16 116356835+AbdeMohlbi@users.noreply.github.com Clarify why the `child` is nullable in `AnimatedTransitionBuilder` (flutter/flutter#182995) 2026-04-16 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from IdBT8fSMYrYSip65j... to di3JdYrdE9OFu8Iyl... (flutter/flutter#185173) 2026-04-16 1063596+reidbaker@users.noreply.github.com Add dart_skills_lint to dev/tool with test and update readme instructions for new skills authors (flutter/flutter#185033) 2026-04-16 flar@google.com [Impeller] Provide std::optional getter for stroke property (flutter/flutter#185112) 2026-04-16 katelovett@google.com Validate itemExtent with geometry in RenderSliverFixedExtentBoxAdaptor (flutter/flutter#185159) 2026-04-16 152433210+mozammal-hossain@users.noreply.github.com [iOS] Clarify provisioning profile error instructions (flutter/flutter#184051) 2026-04-16 bkonyi@google.com [Widget Preview] Fix flaky integration test timeout during flutter clean (flutter/flutter#184991) 2026-04-16 engine-flutter-autoroll@skia.org Roll Dart SDK from fbddcbe0cd96 to 7c2564c18770 (2 revisions) (flutter/flutter#185143) 2026-04-16 sigurdm@google.com Unpin sdk package dependencies (flutter/flutter#184821) 2026-04-16 68919043+Istiak-Ahmed78@users.noreply.github.com Fix ImageInfo.isCloneOf to correctly compare scale values (fixes #184626) (flutter/flutter#184643) 2026-04-16 engine-flutter-autoroll@skia.org Roll Skia from 391cdbe3ffe9 to d8415c5d7b91 (2 revisions) (flutter/flutter#185141) 2026-04-16 154381524+flutteractionsbot@users.noreply.github.com Sync CHANGELOG.md from stable (flutter/flutter#185166) 2026-04-16 154381524+flutteractionsbot@users.noreply.github.com Revert "Move widget_preview_scaffold into pub workspace" (flutter/flutter#185164) 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 Please CC boetger@google.com,stuartmorgan@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: 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
…r#11523) flutter/flutter@31f1802...8e8a194 2026-04-17 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Fix ImageInfo.isCloneOf to correctly compare scale values (fixes #184626) (#184643)" (flutter/flutter#185203) 2026-04-17 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Roll Fuchsia Test Scripts from R2EllDf4DgBXVNuiN... to dQ4PjIJB5kZFU8Y32... (#185192)" (flutter/flutter#185199) 2026-04-17 chris@bracken.jp [iOS] Migrate FlutterLaunchEngine to Swift (flutter/flutter#185151) 2026-04-17 116356835+AbdeMohlbi@users.noreply.github.com Remove unused `FlutterRunArguments.java` file (flutter/flutter#184160) 2026-04-17 engine-flutter-autoroll@skia.org Roll Fuchsia Test Scripts from R2EllDf4DgBXVNuiN... to dQ4PjIJB5kZFU8Y32... (flutter/flutter#185192) 2026-04-17 pewpewstol@gmail.com [Impeller] Fix morphology filter asymmetric dilation/erosion (flutter/flutter#184913) 2026-04-17 nate.w5687@gmail.com `AnimationStyle` methods (flutter/flutter#182333) 2026-04-17 karan@solvejet.net Fix _scheduleSystemFontsUpdate assertion during non-idle scheduler phase (flutter/flutter#184332) 2026-04-17 154381524+flutteractionsbot@users.noreply.github.com Revert "Unpin sdk package dependencies" (flutter/flutter#185186) 2026-04-16 116356835+AbdeMohlbi@users.noreply.github.com Clarify why the `child` is nullable in `AnimatedTransitionBuilder` (flutter/flutter#182995) 2026-04-16 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from IdBT8fSMYrYSip65j... to di3JdYrdE9OFu8Iyl... (flutter/flutter#185173) 2026-04-16 1063596+reidbaker@users.noreply.github.com Add dart_skills_lint to dev/tool with test and update readme instructions for new skills authors (flutter/flutter#185033) 2026-04-16 flar@google.com [Impeller] Provide std::optional getter for stroke property (flutter/flutter#185112) 2026-04-16 katelovett@google.com Validate itemExtent with geometry in RenderSliverFixedExtentBoxAdaptor (flutter/flutter#185159) 2026-04-16 152433210+mozammal-hossain@users.noreply.github.com [iOS] Clarify provisioning profile error instructions (flutter/flutter#184051) 2026-04-16 bkonyi@google.com [Widget Preview] Fix flaky integration test timeout during flutter clean (flutter/flutter#184991) 2026-04-16 engine-flutter-autoroll@skia.org Roll Dart SDK from fbddcbe0cd96 to 7c2564c18770 (2 revisions) (flutter/flutter#185143) 2026-04-16 sigurdm@google.com Unpin sdk package dependencies (flutter/flutter#184821) 2026-04-16 68919043+Istiak-Ahmed78@users.noreply.github.com Fix ImageInfo.isCloneOf to correctly compare scale values (fixes #184626) (flutter/flutter#184643) 2026-04-16 engine-flutter-autoroll@skia.org Roll Skia from 391cdbe3ffe9 to d8415c5d7b91 (2 revisions) (flutter/flutter#185141) 2026-04-16 154381524+flutteractionsbot@users.noreply.github.com Sync CHANGELOG.md from stable (flutter/flutter#185166) 2026-04-16 154381524+flutteractionsbot@users.noreply.github.com Revert "Move widget_preview_scaffold into pub workspace" (flutter/flutter#185164) 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 Please CC boetger@google.com,stuartmorgan@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: 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
This pull request adds an
AnimationStyle.merge()method (for parity with similar APIs) and updatesAnimationStyle.lerp()so that it performs an accurate interpolation.closes #160563