chore: Follow up audomessage speed button design

This commit is contained in:
krille-chan 2024-03-24 11:46:49 +01:00
parent 73c08c3fdd
commit 9b82614fba
No known key found for this signature in database

View file

@ -211,29 +211,6 @@ class AudioPlayerState extends State<AudioPlayerWidget> {
child: Row(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
AnimatedSize(
duration: FluffyThemes.animationDuration,
curve: FluffyThemes.animationCurve,
child: audioPlayer == null
? const SizedBox.shrink()
: SizedBox(
height: 36,
width: 36,
child: IconButton(
padding: EdgeInsets.zero,
onPressed: _toggleSpeed,
//radius: AppConfig.borderRadius * 2,
icon: Text(
'${audioPlayer.speed.toString()}x',
style: const TextStyle(
fontWeight: FontWeight.bold,
fontSize: 12,
),
),
),
),
),
const SizedBox(width: 8),
SizedBox(
width: buttonSize,
height: buttonSize,
@ -307,6 +284,27 @@ class AudioPlayerState extends State<AudioPlayerWidget> {
),
),
),
Stack(
children: [
IconButton(
icon: Icon(Icons.mic_none_outlined, color: widget.color),
onPressed: _toggleSpeed,
),
if (audioPlayer != null)
Positioned(
bottom: 0,
right: 0,
child: Text(
'${audioPlayer.speed.toString()}x',
textAlign: TextAlign.right,
style: TextStyle(
fontSize: 9.0,
color: widget.color,
),
),
),
],
),
],
),
);