gallery
gallery copied to clipboard
Rebuild Triggers a "skip" in the Discrete Slider
https://github.com/flutter/gallery/blob/4e28f7ab09ee970ba19fbd527a028452a1c259a7/lib/demos/material/sliders_demo.dart#L61 https://github.com/flutter/gallery/blob/4e28f7ab09ee970ba19fbd527a028452a1c259a7/lib/demos/material/sliders_demo.dart#L136
Because the discrete slider is rounded to 40 but it's initial value is 20, the slider has a weird skip on rebuild. The discrete slider's initial value should be set to 40 or the rounding interval should be set to 20.
Or maybe Slider in flutter/flutter should be updated to only apply discretization on value change, NOT on arbitrary interaction or rebuild?
Hi, should I change the initial value of _discreteValue to 40, i.e _discreteValue = RestorableDouble(40) ? thank you
Actually, it's possible that this is no longer needed, this PR was merged yesterday https://github.com/flutter/flutter/pull/103966
@guidezpl okay, thank you !