deleteAllFrom method
Used to delete all defined entities from a specific room.
Parameters:
roomType
this will define which room will be cleaned.keys
this will define all entities that will be deleted.playlistKey
this will be the id/key of the playlist*
.
*
playlistKey
it's only required when using RoomType.PLAYLIST.
Return:
- If all defined entities was deleted, will return
true
, if not, will returnfalse
.
See too:
Implementation
Future<bool> deleteAllFrom(
RoomType roomType,
List<int> keys, {
int? playlistKey,
}) async {
if (roomType == RoomType.PLAYLIST && playlistKey == null) {
throw Exception(
"Cannot add [entity] to a undefined [playlist]\n"
"Define the [playlistKey] parameter.",
);
}
return await _controller.deleteAllFromController(
roomType,
keys,
playlistKey: playlistKey,
);
}