queryAllFromPlaylist method
Future<List<SongEntity> >
queryAllFromPlaylist(
- int playlistKey, {
- int limit = 50,
- bool reverse = false,
- RoomSortType? sortType,
Used to query all songs(entities) from playlist
room.
Use checkIn to know if song exist on playlist
room.
Parameters:
playlistKey
this is the id/key of the playlist that will be queried.limit
this will limit the amount of entities queried. Taking less time to run and giving a better performance.reverse
this will define if list return will be reversed or no.sortType
this will define the list sort type.
Important:
- If
limit
is null, will be set to50
. - If
reverse
is null, will be set tofalse
. - If
sortType
is null, will be set tokey
.
Return:
- Will return a list of SongEntity.
See too:
Implementation
Future<List<SongEntity>> queryAllFromPlaylist(
int playlistKey, {
int limit = 50,
bool reverse = false,
RoomSortType? sortType,
}) async {
return _PlaylistDao().queryAllFromPlaylist(
playlistKey,
limit,
reverse,
sortType,
);
}