From fd5eaa27258ce4edeb40b92ad048798d1113bc0b Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Thu, 21 May 2026 12:40:26 -0400 Subject: [PATCH] fix audio player size --- lib/widgets/players/audio.dart | 65 ++++++++++++++++++---------------- 1 file changed, 34 insertions(+), 31 deletions(-) diff --git a/lib/widgets/players/audio.dart b/lib/widgets/players/audio.dart index a851035..f75afe5 100644 --- a/lib/widgets/players/audio.dart +++ b/lib/widgets/players/audio.dart @@ -61,39 +61,42 @@ class AudioPlayer extends HookConsumerWidget { return "$minutes:$seconds"; } - return Card( - color: Theme.of(context).colorScheme.surfaceContainer, - child: Padding( - padding: EdgeInsetsGeometry.only(left: 8, right: 16), - child: Row( - children: [ - IconButton( - onPressed: player.playOrPause, - icon: Icon( - playing.value ? Icons.pause_circle : Icons.play_circle, + return SizedBox( + height: 60, + child: Card( + color: Theme.of(context).colorScheme.surfaceContainer, + child: Padding( + padding: EdgeInsetsGeometry.only(left: 8, right: 16), + child: Row( + children: [ + IconButton( + onPressed: player.playOrPause, + icon: Icon( + playing.value ? Icons.pause_circle : Icons.play_circle, + ), ), - ), - SizedBox(width: 8), - Text( - format(position.value), - style: Theme.of(context).textTheme.bodySmall, - ), - Expanded( - child: Slider( - min: 0, - max: duration.value.inMilliseconds <= 0 - ? 1 - : duration.value.inMilliseconds.toDouble(), - value: position.value.inMilliseconds.toDouble(), - onChanged: (value) => - player.seek(Duration(milliseconds: value.toInt())), + SizedBox(width: 8), + Text( + format(position.value), + style: Theme.of(context).textTheme.bodySmall, ), - ), - Text( - format(duration.value), - style: Theme.of(context).textTheme.bodySmall, - ), - ], + Expanded( + child: Slider( + min: 0, + max: duration.value.inMilliseconds <= 0 + ? 1 + : duration.value.inMilliseconds.toDouble(), + value: position.value.inMilliseconds.toDouble(), + onChanged: (value) => + player.seek(Duration(milliseconds: value.toInt())), + ), + ), + Text( + format(duration.value), + style: Theme.of(context).textTheme.bodySmall, + ), + ], + ), ), ), );