slide method

void slide(
  1. double offset, {
  2. required bool min,
})

Slides the active track to the given offset on the min edge, in logical pixels.

The delta is relative to the origin defined by FSlider.layout.

Implementation

void slide(double offset, {required bool min}) {
  if (interaction == .tap) {
    return;
  }

  assert(min ? active.min : active.max, 'Slider is not extendable at the ${min ? 'min' : 'max'} edge.');

  if (_value case final value?) {
    this.value = value.move(min: min, to: offset);
  }
}