copyWith method

SongInfo copyWith({
  1. int? id,
  2. String? title,
  3. String? album,
  4. int? albumId,
  5. String? artist,
  6. int? artistId,
  7. String? fileUri,
  8. int? duration,
  9. int? bookmark,
  10. String? absolutePath,
  11. bool? isMusic,
  12. bool? isPodcast,
  13. bool? isRingtone,
  14. bool? isAlarm,
  15. bool? isNotification,
  16. int? fileSize,
  17. int? year,
})

Implementation

SongInfo copyWith({
  int? id,
  String? title,
  String? album,
  int? albumId,
  String? artist,
  int? artistId,
  String? fileUri,
  int? duration,
  int? bookmark,
  String? absolutePath,
  bool? isMusic,
  bool? isPodcast,
  bool? isRingtone,
  bool? isAlarm,
  bool? isNotification,
  int? fileSize,
  int? year,
}) {
  return SongInfo(
    id: id ?? this.id,
    title: title ?? this.title,
    album: album ?? this.album,
    albumId: albumId ?? this.albumId,
    artist: artist ?? this.artist,
    artistId: artistId ?? this.artistId,
    fileUri: fileUri ?? this.fileUri,
    duration: duration ?? this.duration,
    bookmark: bookmark ?? this.bookmark,
    absolutePath: absolutePath ?? this.absolutePath,
    isMusic: isMusic ?? this.isMusic,
    isPodcast: isPodcast ?? this.isPodcast,
    isRingtone: isRingtone ?? this.isRingtone,
    isAlarm: isAlarm ?? this.isAlarm,
    isNotification: isNotification ?? this.isNotification,
    fileSize: fileSize ?? this.fileSize,
    year: year ?? this.year,
  );
}