getSongsFromArtistAlbum method
Future<List<SongInfo> >
getSongsFromArtistAlbum({
- required String albumId,
- required String artist,
- SongSortType sortType = SongSortType.DEFAULT,
This method should be used when we want to fetch artist
specific songs
that appears in album
. Sometimes we can have an album with multiple artists
songs if make senses show only the songs for a specific artist that appears on
album
so this is the appropriated method. If you want to show all songs that
appears on album
no matter what artist it belongs you should use getSongsFromAlbum method.
artist
The artist name which that appears on album
. Must be non null.
album
The album. Must be non null.
Implementation
Future<List<SongInfo>> getSongsFromArtistAlbum(
{required final String albumId,
required final String artist,
SongSortType sortType = SongSortType.DEFAULT}) async {
List<dynamic> dataList =
await channel.invokeMethod("getSongsFromArtistAlbum", {
'album_id': albumId,
'artist': artist,
SOURCE_KEY: SOURCE_SONGS,
SORT_TYPE: sortType.index,
});
return _parseSongDataList(dataList);
}