handleOpacity method
Handles the opacity change event.
This method calls the onToggleFill callback with the provided opacity
and then calls handleUpdateUI.
Implementation
void handleOpacity(double opacity) {
onOpacityChange?.call(opacity);
handleUpdateUI();
}