updateBrush method
Updates the brush selection.
Implementation
void updateBrush(double position) {
if (extent == null) return;
final newExtent = extent!.copyWith(end: position);
extent = newExtent;
widget.onBrush?.call(newExtent);
setState(() {});
}