flutter icon indicating copy to clipboard operation
flutter copied to clipboard

add support to customize Slider interacivity

Open werainkhatri opened this issue 2 years ago • 1 comments
trafficstars

design doc: https://docs.flutter.dev/go/permissible-slider-interaction

closes #113370

open questions:

  • [ ] Any semantic config change needed? Now that SliderInteraction.none is handled differently than onChanged being null.
  • [ ] Should Slider.allowedInteraction be added to SliderTheme too?
  • [ ] Should SliderInteraction.slideThumb use the actual thumb rect or overlay rect to determine if the user has tapped down on the “thumb”?
  • [ ] Should SliderInteraction.slideOnTrack be renamed to SliderInteraction.slideOnly coz its essentially that?
  • [ ] Any other name suggestions for -?
    • [ ] The enum
      • SliderInteraction
      • SliderAction
    • [ ] Slider property
      • Slider.allowedInteraction
      • Slider.permissibleInteraction
      • Slider.interaction
      • Slider.allowedAction
      • Slider.permittedAction

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.

werainkhatri avatar Feb 26 '23 14:02 werainkhatri

@TahaTesser may also have some thoughts on this

Piinks avatar Feb 27 '23 19:02 Piinks

@werainkhatri Are you planning to update this to include the switch statement?s

TahaTesser avatar Mar 28 '23 14:03 TahaTesser

Are you planning to update this to include the switch statement?s

yes! have been busy with work. will do it soon.

werainkhatri avatar Apr 03 '23 03:04 werainkhatri

@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.

TahaTesser avatar Apr 13 '23 13:04 TahaTesser

thank you so much! glad to hear that. will do the same by the weekend as I'm travelling now.

werainkhatri avatar Apr 13 '23 14:04 werainkhatri

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?

werainkhatri avatar Apr 18 '23 04:04 werainkhatri

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.

TahaTesser avatar Apr 21 '23 21:04 TahaTesser