33 lines
647 B
Dart
33 lines
647 B
Dart
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
|
|
import 'channel_id.dart';
|
|
|
|
part 'channel.freezed.dart';
|
|
|
|
/// YouTube channel metadata.
|
|
@freezed
|
|
class Channel with _$Channel {
|
|
///
|
|
const factory Channel(
|
|
/// Channel ID.
|
|
ChannelId id,
|
|
|
|
/// Channel title.
|
|
String title,
|
|
|
|
/// URL of the channel's logo image.
|
|
String logoUrl,
|
|
|
|
/// URL of the channel's banner image.
|
|
String bannerUrl,
|
|
|
|
/// The (approximate) channel subscriber's count.
|
|
int? subscribersCount,
|
|
) = _Channel;
|
|
|
|
/// Channel URL.
|
|
String get url => 'http://127.0.0.1:8080/www.youtube.com:443/channel/$id';
|
|
|
|
const Channel._();
|
|
}
|