Fix design

This commit is contained in:
Christian Pauly 2020-03-15 11:47:35 +01:00
parent 9c7b6883f7
commit 9b31f72296

View file

@ -102,9 +102,9 @@ class _AudioPlayerState extends State<AudioPlayer> {
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: <Widget>[ children: <Widget>[
Container( Container(
width: 40, width: 30,
child: status == AudioPlayerStatus.DOWNLOADING child: status == AudioPlayerStatus.DOWNLOADING
? CircularProgressIndicator() ? CircularProgressIndicator(strokeWidth: 2)
: IconButton( : IconButton(
icon: Icon( icon: Icon(
flutterSound.audioState == t_AUDIO_STATE.IS_PLAYING flutterSound.audioState == t_AUDIO_STATE.IS_PLAYING
@ -121,13 +121,15 @@ class _AudioPlayerState extends State<AudioPlayer> {
}, },
), ),
), ),
Slider( Expanded(
child: Slider(
value: currentPosition, value: currentPosition,
onChanged: (double position) => onChanged: (double position) =>
flutterSound.seekToPlayer(position.toInt()), flutterSound.seekToPlayer(position.toInt()),
max: status == AudioPlayerStatus.DOWNLOADED ? maxPosition : 0, max: status == AudioPlayerStatus.DOWNLOADED ? maxPosition : 0,
min: 0, min: 0,
), ),
),
Text( Text(
statusText, statusText,
style: TextStyle( style: TextStyle(