toSongEntity method

SongEntity toSongEntity()

Used to parse a Map into a SongEntity.

Important & Paramaters:

  • Only this parameters will be used used:

    • @NonNull _data
    • _display_name
    • @NonNull _id
    • album
    • album_id
    • artist
    • artist_id
    • date_added
    • duration
    • @NonNull title
    • artwork

Implementation

SongEntity toSongEntity() {
  return SongEntity()
    ..lastData = this["_data"]
    ..displayName = this["_display_name"]
    ..id = this["_id"]
    ..album = this["album"]
    ..albumId = this["album_id"]
    ..artist = this["artist"]
    ..artistId = this["artist_id"]
    ..dateAdded = this["date_added"]
    ..duration = this["duration"]
    ..title = this["title"]
    ..artworkAsBytes = this["artwork"];
}