youtube_explode/lib/src/channels/channel.dart

31 lines
666 B
Dart
Raw Normal View History

import 'package:equatable/equatable.dart';
2020-06-03 13:18:37 +02:00
import 'channel_id.dart';
/// YouTube channel metadata.
class Channel with EquatableMixin {
2020-06-03 13:18:37 +02:00
/// Channel ID.
final ChannelId id;
/// Channel URL.
String get url => 'https://www.youtube.com/channel/$id';
/// Channel title.
final String title;
/// URL of the channel's logo image.
final String logoUrl;
2021-07-14 22:36:25 +02:00
/// The (approximate) channel subscriber's count.
final int? subscribersCount;
2020-06-03 13:18:37 +02:00
/// Initializes an instance of [Channel]
2021-07-14 22:36:25 +02:00
Channel(this.id, this.title, this.logoUrl, this.subscribersCount);
2020-06-03 13:18:37 +02:00
@override
String toString() => 'Channel ($title)';
@override
List<Object> get props => [id];
2020-06-03 13:18:37 +02:00
}