handleLineWidthChanged method
Handles the line width change event.
This method calls the onLineWidthChanged callback with the provided newWidth
and then calls handleUpdateUI.
Implementation
void handleLineWidthChanged(double newWidth) {
onLineWidthChanged?.call(newWidth);
handleUpdateUI();
}