flutter
flutter copied to clipboard
add support to customize Slider interacivity
design doc: https://docs.flutter.dev/go/permissible-slider-interaction
closes #113370
open questions:
- [ ] Any semantic config change needed? Now that
SliderInteraction.noneis handled differently thanonChangedbeing null. - [ ] Should
Slider.allowedInteractionbe added toSliderThemetoo? - [ ] Should
SliderInteraction.slideThumbuse the actual thumb rect or overlay rect to determine if the user has tapped down on the “thumb”? - [ ] Should
SliderInteraction.slideOnTrackbe renamed toSliderInteraction.slideOnlycoz its essentially that? - [ ] Any other name suggestions for -?
- [ ] The enum
- SliderInteraction
- SliderAction
- [ ] Slider property
- Slider.allowedInteraction
- Slider.permissibleInteraction
- Slider.interaction
- Slider.allowedAction
- Slider.permittedAction
- [ ] The enum
Pre-launch Checklist
- [x] I read the Contributor Guide and followed the process outlined there for submitting PRs.
- [x] I read the Tree Hygiene wiki page, which explains my responsibilities.
- [x] I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
- [x] I signed the CLA.
- [x] I listed at least one issue that this PR fixes in the description above.
- [x] I updated/added relevant documentation (doc comments with
///). - [x] I added new tests to check the change I am making, or this PR is test-exempt.
- [x] All existing and new tests are passing.
@TahaTesser may also have some thoughts on this
@werainkhatri Are you planning to update this to include the switch statement?s
Are you planning to update this to include the switch statement?s
yes! have been busy with work. will do it soon.
@werainkhatri Just tried the latest commit. Overall this looks good. Could you please update your description to reflect the progress and remove anything not relevant anymore?
Should Slider.allowedInteraction be added to SliderTheme too?
I don't see a reason to not add this to the SliderTheme. Would be nice to theme slider interactions.
thank you so much! glad to hear that. will do the same by the weekend as I'm travelling now.
thanks for the review, and fixing the style.
could you help me with this from the description?
- [ ] Should this be added to debugFillProperties? I see only a few things existing in that list.
also, are the names of classes and arguments okay?
thanks for the review, and fixing the style.
could you help me with this from the description?
- [ ] Should this be added to debugFillProperties? I see only a few things existing in that list.
also, are the names of classes and arguments okay?
You can add them as it is, we can always edit the names before finalizing this.