为 audioplayers_android 模块单独设置 Java 1.8,其他模块保持 Java 17

This commit is contained in:
Developer
2026-03-31 03:13:47 +08:00
parent 7c09ade2bb
commit d66dc73349
24 changed files with 367 additions and 527 deletions

View File

@@ -293,8 +293,8 @@ class _HomePageState extends State<HomePage>
Future<void> _toggleLike() async {
if (_poetryData == null || _isLoadingLike) return;
// 播放点赞音效
await AudioManager().playLikeSound();
// 播放点赞音效(不等待完成)
AudioManager().playLikeSound();
// 立即切换按钮状态和显示加载
setState(() {
@@ -397,7 +397,7 @@ class _HomePageState extends State<HomePage>
});
}
} catch (e) {
print('加载历史记录失败: $e');
// 加载失败
}
}
@@ -413,7 +413,7 @@ class _HomePageState extends State<HomePage>
await HistoryController.addToHistory(poetryMap);
} catch (e) {
print('保存历史记录失败: $e');
// 保存失败
}
}
@@ -434,8 +434,8 @@ class _HomePageState extends State<HomePage>
void _loadNextPoetry() async {
if (_isLoadingNext) return;
// 播放下一条音效
await AudioManager().playNextSound();
// 播放下一条音效(不等待完成)
AudioManager().playNextSound();
setState(() {
_isLoadingNext = true;