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

隐藏语音播放的按钮

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