🐛 Bug fixes

This commit is contained in:
2024-08-30 22:06:24 +08:00
parent 47d051dd44
commit fbb12ff801
4 changed files with 8 additions and 10 deletions

View File

@ -47,18 +47,19 @@ class _PlayerControlsState extends State<PlayerControls> {
onPressed: _isFetchingActiveTrack ? null : audioPlayer.skipToNext,
),
IconButton.filled(
icon: _isFetchingActiveTrack
icon: (_isFetchingActiveTrack && _isPlaying)
? const SizedBox(
height: 20,
width: 20,
child: CircularProgressIndicator(
strokeWidth: 3,
color: Colors.white,
),
)
: Icon(
!_isPlaying ? Icons.play_arrow : Icons.pause,
),
onPressed: _isFetchingActiveTrack ? null : _togglePlayState,
onPressed: _togglePlayState,
),
if (MediaQuery.of(context).size.width >= 720)
IconButton(