attach method
Registers the controller to a slider with the given extent and marks.
A controller can only be attached to a single slider at a time.
Implementation
@override
void attach(double extent, List<FSliderMark> marks) {
assert(marks.isNotEmpty, 'At least one mark is required.');
final proposed = DiscreteValue(
extent: extent,
constraints: value.constraints,
min: value.min,
max: value.max,
ticks: .fromIterable(marks.map((mark) => mark.value), value: (_) {}),
);
if (_value == null) {
_value = proposed; // We don't want to notify listeners when performing initialization.
} else {
value = proposed;
}
}