queryAllFromPlaylist method

Future<List<SongEntity>> queryAllFromPlaylist(
  1. int playlistKey, {
  2. int limit = 50,
  3. bool reverse = false,
  4. 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 to 50.
  • If reverse is null, will be set to false.
  • If sortType is null, will be set to key.

Return:

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,
  );
}