鸿蒙提交

This commit is contained in:
Developer
2026-06-08 09:29:24 +08:00
parent 23b327196d
commit e53cd7f496
4 changed files with 9 additions and 5 deletions

View File

@@ -94,7 +94,11 @@ class _TtsPlayerSheetState extends ConsumerState<TtsPlayerSheet> {
_subscribeSystemTts();
_subscribeOnlineTts();
_subscribeSystemTtsErrors();
_startPlaying();
// 延迟到构建完成后启动朗读避免在initState中修改provider导致
// "Tried to modify a provider while the widget tree was building" 错误
WidgetsBinding.instance.addPostFrameCallback((_) {
if (mounted) _startPlaying();
});
}
/// 从插件状态读取配置