write method

  1. @override
void write(
  1. BinaryWriter writer,
  2. SongEntity obj
)
override

Is called when a value has to be encoded.

Implementation

@override
void write(BinaryWriter writer, SongEntity obj) {
  writer
    ..writeByte(12)
    ..writeByte(0)
    ..write(obj.lastData)
    ..writeByte(1)
    ..write(obj.displayName)
    ..writeByte(2)
    ..write(obj.id)
    ..writeByte(3)
    ..write(obj.album)
    ..writeByte(4)
    ..write(obj.albumId)
    ..writeByte(5)
    ..write(obj.artist)
    ..writeByte(6)
    ..write(obj.artistId)
    ..writeByte(7)
    ..write(obj.dateAdded)
    ..writeByte(8)
    ..write(obj.duration)
    ..writeByte(9)
    ..write(obj.title)
    ..writeByte(10)
    ..write(obj.artwork)
    ..writeByte(15)
    ..write(obj.artworkAsBytes);
}