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( Stack(
children: [ children: [
IconButton( SizedBox(
constraints: const BoxConstraints( width: buttonSize,
maxHeight: 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) if (audioPlayer != null)
Positioned( Positioned(
bottom: 0, bottom: 0,
left: 0,
right: 0, right: 0,
child: Text( child: Text(
'${audioPlayer.speed.toString()}x', '${audioPlayer.speed.toString()}x',
textAlign: TextAlign.right, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
fontSize: 9.0, fontSize: 9.0,
color: widget.color, color: widget.color,