adjustPoint method
Adjust either xModifier
or yModifier
of point.
Implementation
void adjustPoint(final int xModifier, final int yModifier) {
final x = point.x + xModifier;
final y = point.y + yModifier;
point = Point(
x.clamp(widget.minValue?.x ?? x, widget.maxValue?.x ?? x),
y.clamp(widget.minValue?.y ?? y, widget.maxValue?.y ?? y),
);
widget.onChanged(point);
setState(() {});
}