chore: Follow up audioplayer design

This commit is contained in:
Krille 2024-03-27 09:30:16 +01:00
parent f3141f955d
commit cba1a9bd5e
No known key found for this signature in database
GPG key ID: E067ECD60F1A0652

View file

@ -283,22 +283,27 @@ class AudioPlayerState extends State<AudioPlayerWidget> {
),
),
),
const SizedBox(width: 4),
Stack(
children: [
IconButton(
constraints: const BoxConstraints(
maxHeight: buttonSize,
SizedBox(
width: buttonSize,
height: buttonSize,
child: InkWell(
splashColor: widget.color.withAlpha(128),
borderRadius: BorderRadius.circular(64),
onTap: audioPlayer == null ? null : _toggleSpeed,
child: Icon(Icons.mic_none_outlined, color: widget.color),
),
icon: Icon(Icons.mic_none_outlined, color: widget.color),
onPressed: _toggleSpeed,
),
if (audioPlayer != null)
Positioned(
bottom: 0,
left: 0,
right: 0,
child: Text(
'${audioPlayer.speed.toString()}x',
textAlign: TextAlign.right,
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 9.0,
color: widget.color,