Fix design

This commit is contained in:
Christian Pauly 2020-03-15 11:47:35 +01:00
parent 9c7b6883f7
commit 9b31f72296
1 changed files with 10 additions and 8 deletions

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,12 +121,14 @@ class _AudioPlayerState extends State<AudioPlayer> {
}, },
), ),
), ),
Slider( Expanded(
value: currentPosition, child: Slider(
onChanged: (double position) => value: currentPosition,
flutterSound.seekToPlayer(position.toInt()), onChanged: (double position) =>
max: status == AudioPlayerStatus.DOWNLOADED ? maxPosition : 0, flutterSound.seekToPlayer(position.toInt()),
min: 0, max: status == AudioPlayerStatus.DOWNLOADED ? maxPosition : 0,
min: 0,
),
), ),
Text( Text(
statusText, statusText,