handleChanged method
Handles the value change event.
This method calls the onChanged callback with the provided newValue
and then calls handleUpdateUI.
Implementation
void handleChanged(String newValue) {
onChanged?.call(newValue);
handleUpdateUI();
}