commit
5528ba70db
2 changed files with 3 additions and 3 deletions
|
|
@ -142,7 +142,7 @@ class OverlayMessageTextState extends State<OverlayMessageText> {
|
|||
widget.overlayController.onClickOverlayMessageToken(
|
||||
tokenPosition.token!,
|
||||
);
|
||||
setState(() {});
|
||||
if (mounted) setState(() {});
|
||||
},
|
||||
text: substring,
|
||||
style: style.merge(
|
||||
|
|
|
|||
|
|
@ -45,8 +45,8 @@ class TtsController {
|
|||
|
||||
await tts.awaitSpeakCompletion(true);
|
||||
|
||||
final voices = await tts.getVoices;
|
||||
availableLangCodes = (voices as List)
|
||||
final voices = (await tts.getVoices) as List?;
|
||||
availableLangCodes = (voices ?? [])
|
||||
.map((v) {
|
||||
// on iOS / web, the codes are in 'locale', but on Android, they are in 'name'
|
||||
final nameCode = v['name']?.split("-").first;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue