youtube_explode/lib/src/playlists/playlist.dart

36 lines
819 B
Dart
Raw Normal View History

import 'package:equatable/equatable.dart';
2020-06-03 23:02:21 +02:00
import '../common/common.dart';
import 'playlist_id.dart';
2020-06-05 20:08:04 +02:00
/// YouTube playlist metadata.
class Playlist with EquatableMixin {
2020-06-03 23:02:21 +02:00
/// Playlist ID.
final PlaylistId id;
/// Playlist URL.
String get url => 'https://www.youtube.com/playlist?list=$id';
/// Playlist title.
final String title;
/// Playlist author.
/// Can be null if it's a system playlist (e.g. Video Mix, Topics, etc.).
final String author;
/// Playlist description.
final String description;
/// Engagement statistics.
final Engagement engagement;
/// Initializes an instance of [Playlist].
Playlist(this.id, this.title, this.author, this.description, this.engagement);
@override
String toString() => 'Playlist ($title)';
@override
List<Object> get props => [id];
2020-06-03 23:02:21 +02:00
}