feat: save repeat audio on mic record and rename button to play repeat

This commit is contained in:
shen
2026-09-15 22:52:49 +08:00
parent 2a2668829d
commit 11929d6a03
8 changed files with 113 additions and 94 deletions
@@ -377,6 +377,7 @@ class _DialoguePageState extends State<DialoguePage> {
aiVoiceRecording = false;
listening = false;
transcribing = true;
recordingPath = path;
});
if (path != null) {
final config = widget.state.aiConfig;
@@ -489,8 +490,12 @@ class _DialoguePageState extends State<DialoguePage> {
final path = recordingPath;
if (path == null) return;
setState(() => playingRecording = true);
await VoiceService.instance.playRecording(path);
if (mounted) setState(() => playingRecording = false);
await VoiceService.instance.playRecording(
path,
onComplete: () {
if (mounted) setState(() => playingRecording = false);
},
);
}
Future<void> _deleteRecording() async {