2020-03-24 22:17:03 +01:00
|
|
|
import 'package:equatable/equatable.dart';
|
2020-03-28 14:35:41 +01:00
|
|
|
import 'package:meta/meta.dart';
|
2020-03-24 22:17:03 +01:00
|
|
|
|
|
|
|
class Song extends Equatable {
|
2020-04-11 14:27:49 +02:00
|
|
|
const Song({
|
2020-03-28 14:35:41 +01:00
|
|
|
@required this.album,
|
|
|
|
@required this.artist,
|
2020-09-19 17:08:48 +02:00
|
|
|
@required this.blocked,
|
2020-10-18 12:18:37 +02:00
|
|
|
@required this.duration,
|
|
|
|
@required this.path,
|
|
|
|
@required this.title,
|
|
|
|
this.albumArtPath,
|
2020-09-28 20:04:03 +02:00
|
|
|
this.discNumber,
|
2020-10-18 12:18:37 +02:00
|
|
|
this.next,
|
|
|
|
this.previous,
|
2020-03-28 14:35:41 +01:00
|
|
|
this.trackNumber,
|
2020-12-31 10:45:56 +01:00
|
|
|
this.likeCount,
|
|
|
|
this.skipCount,
|
|
|
|
this.playCount,
|
2020-03-28 14:35:41 +01:00
|
|
|
});
|
|
|
|
|
2020-03-24 22:17:03 +01:00
|
|
|
final String album;
|
|
|
|
final String artist;
|
2020-12-31 10:45:56 +01:00
|
|
|
|
2020-10-18 12:18:37 +02:00
|
|
|
/// Is this song blocked in shuffle mode?
|
|
|
|
final bool blocked;
|
2020-12-31 10:45:56 +01:00
|
|
|
|
2020-04-11 14:27:49 +02:00
|
|
|
/// Duration in milliseconds.
|
|
|
|
final int duration;
|
2020-10-18 12:18:37 +02:00
|
|
|
final String path;
|
|
|
|
final String title;
|
|
|
|
|
2020-12-31 10:45:56 +01:00
|
|
|
final int likeCount;
|
|
|
|
final int skipCount;
|
|
|
|
final int playCount;
|
|
|
|
|
2020-10-18 12:18:37 +02:00
|
|
|
final String albumArtPath;
|
2020-09-28 20:04:03 +02:00
|
|
|
final int discNumber;
|
2020-10-18 12:18:37 +02:00
|
|
|
final String next;
|
|
|
|
final String previous;
|
2020-04-11 14:27:49 +02:00
|
|
|
final int trackNumber;
|
2020-03-24 22:17:03 +01:00
|
|
|
|
|
|
|
@override
|
2021-01-09 19:55:56 +01:00
|
|
|
List<Object> get props => [
|
|
|
|
path,
|
|
|
|
title,
|
|
|
|
album,
|
|
|
|
artist,
|
|
|
|
blocked,
|
|
|
|
next,
|
|
|
|
previous,
|
|
|
|
likeCount,
|
|
|
|
playCount,
|
|
|
|
skipCount,
|
|
|
|
];
|
2020-03-24 22:17:03 +01:00
|
|
|
}
|