Skip to content

Commit

Permalink
Add play button to Playlists and Albums
Browse files Browse the repository at this point in the history
  • Loading branch information
Merlin Sievers committed Mar 23, 2024
1 parent 7603064 commit d62f6ae
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions lib/ui/screens/PlaylistNAlbum/playlistnalbum_screen.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import 'dart:developer';

import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:harmonymusic/services/downloader.dart';
import 'package:harmonymusic/utils/helper.dart';

import '../../widgets/loader.dart';
import '../../widgets/modification_list.dart';
Expand Down Expand Up @@ -348,8 +351,8 @@ class PlaylistNAlbumScreen extends StatelessWidget {
playListNAlbumScreenController
.isAddedToLibrary
.isFalse
? 130
: 180,
? 180
: 230,
width: 47,
decoration: BoxDecoration(
color: Theme.of(context)
Expand Down Expand Up @@ -559,7 +562,17 @@ class PlaylistNAlbumScreen extends StatelessWidget {
: const Icon(Icons
.download_rounded),
);
})
}),
IconButton(
onPressed: () {
Get.find<PlayerController>()
.playPlayListSong(playListNAlbumScreenController.songList, 0);
if (playListNAlbumScreenController.contentRenderer is Playlist) {
playListNAlbumScreenController.contentRenderer.updateLastPlayed();
}
},
icon: const Icon(Icons.play_arrow)
)
],
),
),
Expand Down

0 comments on commit d62f6ae

Please sign in to comment.