提交 74a1a0b1 authored 作者: songchuancai's avatar songchuancai

隐藏语音播放的按钮

上级 02c8e358
......@@ -36,7 +36,7 @@ class _ChatBubbleState extends State<ChatBubble> {
// 设置语速
flutterTts.setSpeechRate(2.5);
flutterTts.setSpeechRate(1.0);
// 设置音调
......@@ -169,35 +169,35 @@ class _ChatBubbleState extends State<ChatBubble> {
listBullet: const TextStyle(color: Colors.black87),
),
),
if (!widget.message.isUserMessage && !widget.isTyping) ...[
const SizedBox(height: 8),
Row(
mainAxisSize: MainAxisSize.min,
children: [
IconButton(
icon: Icon(
isPlaying ? Icons.stop_circle : Icons.play_circle,
color: Colors.black87,
size: 20,
),
constraints: const BoxConstraints(
minWidth: 32,
minHeight: 32,
),
padding: EdgeInsets.zero,
onPressed: _handlePlayStop,
),
if (isPlaying)
Text(
'正在播放...',
style: TextStyle(
color: Colors.black87,
fontSize: 12,
),
),
],
),
],
// if (!widget.message.isUserMessage && !widget.isTyping) ...[
// const SizedBox(height: 8),
// Row(
// mainAxisSize: MainAxisSize.min,
// children: [
// IconButton(
// icon: Icon(
// isPlaying ? Icons.stop_circle : Icons.play_circle,
// color: Colors.black87,
// size: 20,
// ),
// constraints: const BoxConstraints(
// minWidth: 32,
// minHeight: 32,
// ),
// padding: EdgeInsets.zero,
// onPressed: _handlePlayStop,
// ),
// if (isPlaying)
// Text(
// '正在播放...',
// style: TextStyle(
// color: Colors.black87,
// fontSize: 12,
// ),
// ),
// ],
// ),
// ],
],
),
),
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论