From 584e4e1f84eb7af9f8ff52a6f5d193fbcca80564 Mon Sep 17 00:00:00 2001 From: ggurdin Date: Tue, 24 Jun 2025 11:33:26 -0400 Subject: [PATCH] chore: replace mic icon with 1x default playback speed icon --- lib/pages/chat/events/audio_player.dart | 83 ++++++++++++++++--------- 1 file changed, 54 insertions(+), 29 deletions(-) diff --git a/lib/pages/chat/events/audio_player.dart b/lib/pages/chat/events/audio_player.dart index 2131dd868..11bbfba52 100644 --- a/lib/pages/chat/events/audio_player.dart +++ b/lib/pages/chat/events/audio_player.dart @@ -585,43 +585,68 @@ class AudioPlayerState extends State { ), // Pangea# const SizedBox(width: 8), - AnimatedCrossFade( - firstChild: Padding( - padding: const EdgeInsets.only(right: 8.0), - child: Icon( - Icons.mic_none_outlined, - color: widget.color, - ), - ), - secondChild: Material( - color: widget.color.withAlpha(64), + // #Pangea + Material( + color: widget.color.withAlpha(64), + borderRadius: + BorderRadius.circular(AppConfig.borderRadius), + child: InkWell( borderRadius: BorderRadius.circular(AppConfig.borderRadius), - child: InkWell( - borderRadius: - BorderRadius.circular(AppConfig.borderRadius), - onTap: _toggleSpeed, - child: SizedBox( - width: 32, - height: 20, - child: Center( - child: Text( - '${audioPlayer?.speed.toString()}x', - style: TextStyle( - color: widget.color, - fontSize: 9, - ), + onTap: _toggleSpeed, + child: SizedBox( + width: 32, + height: 20, + child: Center( + child: Text( + '${audioPlayer?.speed.toString() ?? 1}x', + style: TextStyle( + color: widget.color, + fontSize: 9, ), ), ), ), ), - alignment: Alignment.center, - crossFadeState: audioPlayer == null - ? CrossFadeState.showFirst - : CrossFadeState.showSecond, - duration: FluffyThemes.animationDuration, ), + // AnimatedCrossFade( + // firstChild: Padding( + // padding: const EdgeInsets.only(right: 8.0), + // child: Icon( + // Icons.mic_none_outlined, + // color: widget.color, + // ), + // ), + // secondChild: Material( + // color: widget.color.withAlpha(64), + // borderRadius: + // BorderRadius.circular(AppConfig.borderRadius), + // child: InkWell( + // borderRadius: + // BorderRadius.circular(AppConfig.borderRadius), + // onTap: _toggleSpeed, + // child: SizedBox( + // width: 32, + // height: 20, + // child: Center( + // child: Text( + // '${audioPlayer?.speed.toString()}x', + // style: TextStyle( + // color: widget.color, + // fontSize: 9, + // ), + // ), + // ), + // ), + // ), + // ), + // alignment: Alignment.center, + // crossFadeState: audioPlayer == null + // ? CrossFadeState.showFirst + // : CrossFadeState.showSecond, + // duration: FluffyThemes.animationDuration, + // ), + // Pangea# ], ), ),