updateBrush method

void updateBrush(
  1. double position
)

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(() {});
}