Compare commits

...

2 Commits

Author SHA1 Message Date
Max 7ed4511643 feat: update version 2025-09-10 09:33:21 +08:00
Max ec003dcd4b feat: 为RecordingButton组件增加自定义图标和图标大小设置
- 添加 idleIcon 参数支持自定义空闲状态图标
- 添加 recordingIcon 参数支持自定义录音状态图标
- 添加 iconSize 参数支持自定义图标大小
- 保持向后兼容性,使用默认图标和大小
- 更新组件文档注释
2025-09-10 09:32:02 +08:00
2 changed files with 6 additions and 2 deletions

View File

@ -52,6 +52,9 @@ class RecordingButton extends StatefulWidget {
/// ///
final IconData? recordingIcon; final IconData? recordingIcon;
///
final double iconSize;
const RecordingButton({ const RecordingButton({
super.key, super.key,
this.speechService, this.speechService,
@ -68,6 +71,7 @@ class RecordingButton extends StatefulWidget {
this.tooltip, this.tooltip,
this.idleIcon, this.idleIcon,
this.recordingIcon, this.recordingIcon,
this.iconSize = 40.0,
}); });
@override @override
@ -236,7 +240,7 @@ class _RecordingButtonState extends State<RecordingButton>
_isListening _isListening
? (widget.recordingIcon ?? Icons.stop_rounded) ? (widget.recordingIcon ?? Icons.stop_rounded)
: (widget.idleIcon ?? Icons.mic_rounded), : (widget.idleIcon ?? Icons.mic_rounded),
size: widget.size * 0.55, size: widget.iconSize,
color: iconColor, color: iconColor,
), ),
), ),

View File

@ -1,6 +1,6 @@
name: yx_asr name: yx_asr
description: 基于 sherpa_onnx 的 Flutter 语音识别插件,提供完全离线的实时语音转文字功能。 description: 基于 sherpa_onnx 的 Flutter 语音识别插件,提供完全离线的实时语音转文字功能。
version: 1.0.1 version: 1.0.2
homepage: https://github.com/yuanxuan/yx_asr homepage: https://github.com/yuanxuan/yx_asr
environment: environment: