diff --git a/lib/src/playlists/view/playlist_page.dart b/lib/src/playlists/view/playlist_page.dart index 1ec2b6424..a594bf0c0 100644 --- a/lib/src/playlists/view/playlist_page.dart +++ b/lib/src/playlists/view/playlist_page.dart @@ -300,61 +300,63 @@ class _PlaylistPageBody extends StatelessWidget with WatchItMixin { descriptionWidget: _PlaylistGenreBar(audios: audios), ); - return CustomScrollView( - slivers: [ - SliverToBoxAdapter( - child: audioPageHeader, - ), - SliverAudioPageControlPanel(controlPanel: audioControlPanel), - if (allowReorder) - SliverReorderableList( - itemCount: audios.length, - itemBuilder: (BuildContext context, int index) { - final audio = audios.elementAt(index); - final audioSelected = currentAudio == audio; + return AdaptiveContainer( + child: CustomScrollView( + slivers: [ + SliverToBoxAdapter( + child: audioPageHeader, + ), + SliverAudioPageControlPanel(controlPanel: audioControlPanel), + if (allowReorder) + SliverReorderableList( + itemCount: audios.length, + itemBuilder: (BuildContext context, int index) { + final audio = audios.elementAt(index); + final audioSelected = currentAudio == audio; - return ReorderableDragStartListener( - key: ValueKey(audio.path ?? audio.url), - index: index, - child: AudioTile( - onSubTitleTap: onArtistTap, + return ReorderableDragStartListener( key: ValueKey(audio.path ?? audio.url), - isPlayerPlaying: isPlaying, - pause: playerModel.pause, - startPlaylist: () => playerModel.startPlaylist( - audios: audios, - listName: pageId, - index: index, + index: index, + child: AudioTile( + onSubTitleTap: onArtistTap, + key: ValueKey(audio.path ?? audio.url), + isPlayerPlaying: isPlaying, + pause: playerModel.pause, + startPlaylist: () => playerModel.startPlaylist( + audios: audios, + listName: pageId, + index: index, + ), + resume: playerModel.resume, + selected: audioSelected, + audio: audio, + insertIntoQueue: playerModel.insertIntoQueue, + pageId: pageId, + libraryModel: libraryModel, + audioPageType: AudioPageType.playlist, ), - resume: playerModel.resume, - selected: audioSelected, - audio: audio, - insertIntoQueue: playerModel.insertIntoQueue, - pageId: pageId, - libraryModel: libraryModel, - audioPageType: AudioPageType.playlist, - ), - ); - }, - onReorder: (oldIndex, newIndex) { - if (playerModel.queueName == pageId) { - playerModel.moveAudioInQueue(oldIndex, newIndex); - } + ); + }, + onReorder: (oldIndex, newIndex) { + if (playerModel.queueName == pageId) { + playerModel.moveAudioInQueue(oldIndex, newIndex); + } - libraryModel.moveAudioInPlaylist( - oldIndex: oldIndex, - newIndex: newIndex, - id: pageId, - ); - }, - ) - else - SliverAudioTileList( - audios: audios, - pageId: pageId, - audioPageType: AudioPageType.playlist, - ), - ], + libraryModel.moveAudioInPlaylist( + oldIndex: oldIndex, + newIndex: newIndex, + id: pageId, + ); + }, + ) + else + SliverAudioTileList( + audios: audios, + pageId: pageId, + audioPageType: AudioPageType.playlist, + ), + ], + ), ); } }