toPlaylistEntity property

PlaylistEntity toPlaylistEntity

This method will convert a String into a PlaylistEntity.

When creating a playlist entity:

  • Key will be automatically generated.
  • DateModified will be automatically added.
  • DateAdded will be automatically added.
  • Songs will be a empty list.

Implementation

PlaylistEntity get toPlaylistEntity {
  List<SongEntity> emptyList = [];
  return PlaylistEntity(
    _getUniqueKey,
    this,
    0,
    0,
    emptyList,
  );
}