[material_ui] Add SemanticsRole.slider to Slider - #12709
Draft
hannah-hyj wants to merge 1 commit into
Draft
Conversation
Adds SemanticsRole.slider, minValue, and maxValue to Slider semantics. Fixes flutter/flutter#184030 Related to flutter/flutter#184029
Contributor
There was a problem hiding this comment.
Code Review
This pull request adds SemanticsRole.slider and min/max value bounds to the Slider semantics configuration, updating both the implementation and corresponding tests. Feedback suggests accessing the RenderObject's own min and max properties directly rather than through _state.widget to improve encapsulation.
Comment on lines
+1998
to
+1999
| config.minValue = _state.widget.min.toString(); | ||
| config.maxValue = _state.widget.max.toString(); |
Contributor
There was a problem hiding this comment.
Instead of accessing the widget's properties directly via _state.widget.min and _state.widget.max, it is more idiomatic to use the RenderObject's own min and max properties. This respects the encapsulation of the RenderObject and ensures consistency with how other properties are accessed.
config.minValue = min.toString();
config.maxValue = max.toString();
hannah-hyj
marked this pull request as draft
September 1, 2026 01:50
10 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds SemanticsRole.slider, minValue, and maxValue to Slider semantics.
issue: flutter/flutter#184030
blocked by flutter/flutter#184029
Pre-Review Checklist
[shared_preferences]///).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-assistbot 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.Footnotes
Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. ↩ ↩2