[Slider] Remove value indicator painter when animation is dismissed by dkwingsmt · Pull Request #182991 · flutter/flutter

With this PR, Slider stops painting the value indicator when activationAnimation is dismissed.

Fixes #180767.

This change has no effect on default value indicator shapes, which animates with activationAnimation and do not paint anything when the animation is dismissed. However, for custom value indicator shapes that do not animate, this allows value indicators to be properly hidden after the animation duration.

For testing, this PR refactors an existing test case, since I consider the new test case a superset of the previous one and improves its capability.

  • Previously the test case only verifies the status before dragging and during dragging. Now it also verifies that after dragging.
  • Previously the test case uses the default value indicator shapes. Now it uses a custom one that does not animate.

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the gemini-code-assist bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.