[Slider] Refactor test "Value indicator appears when it should" by dkwingsmt · Pull Request #183143 · flutter/flutter

This PR refactors this slider test so that

  • The test is split into multiple tests in a single group for better readability.
  • A single expectValueIndicator tests both the dragged state and the released state, for better readability.
  • The widget state is reset at the end of expectValueIndicator to avoid state leak...
  • ... which revealed a test case that has been written incorrectly.
  • ShowValueIndicator.alwaysVisible's doc is corrected to reflect its actual behavior.

This PR is split from, and is a prerequisite of, #182991.

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.