NowPlayingTrack constructor

NowPlayingTrack({
  1. String? id,
  2. String? title,
  3. String? album,
  4. String? artist,
  5. Duration duration = Duration.zero,
  6. NowPlayingState state = NowPlayingState.stopped,
  7. String? source,
  8. Duration position = Duration.zero,
  9. DateTime? createdAt,
})

Implementation

NowPlayingTrack({
  String? id,
  this.title,
  this.album,
  this.artist,
  this.duration = Duration.zero,
  this.state = NowPlayingState.stopped,
  this.source,
  this.position = Duration.zero,
  DateTime? createdAt,
})  : this.id = id ?? Uuid().v4(),
      this.createdAt = createdAt ?? DateTime.now();