roundToDivisions method

SliderValue roundToDivisions(
  1. int divisions
)

Implementation

SliderValue roundToDivisions(int divisions) {
  if (!isRanged) {
    return SliderValue.single((_end * divisions).round() / divisions);
  }
  return SliderValue.ranged((_start! * divisions).round() / divisions,
      (_end * divisions).round() / divisions);
}