handleTextAlignChanged method
Handles the text alignment change event.
This method calls the onTextAlignChanged callback with the provided newTextAlign
and then calls handleUpdateUI.
Implementation
void handleTextAlignChanged(TextAlign newTextAlign) {
onTextAlignChanged?.call(newTextAlign);
handleUpdateUI();
}