chore: update phonetic transcription when text changes

This commit is contained in:
ggurdin 2025-06-24 16:05:41 -04:00
parent a71a5f2ddb
commit 4c11a2a079
No known key found for this signature in database
GPG key ID: A01CB41737CBB478

View file

@ -51,6 +51,17 @@ class _PhoneticTranscriptionWidgetState
_fetchTranscription();
}
@override
void didUpdateWidget(
covariant PhoneticTranscriptionWidget oldWidget,
) {
super.didUpdateWidget(oldWidget);
if (oldWidget.text != widget.text ||
oldWidget.textLanguage != widget.textLanguage) {
_fetchTranscription();
}
}
Future<void> _fetchTranscription() async {
try {
setState(() {