youtube_explode/lib/src/channels/channel.dart

33 lines
647 B
Dart
Raw Normal View History

import 'package:freezed_annotation/freezed_annotation.dart';
2020-06-03 13:18:37 +02:00
import 'channel_id.dart';
part 'channel.freezed.dart';
2020-06-03 13:18:37 +02:00
/// YouTube channel metadata.
@freezed
class Channel with _$Channel {
///
const factory Channel(
/// Channel ID.
ChannelId id,
2020-06-03 13:18:37 +02:00
/// Channel title.
String title,
2021-07-14 22:36:25 +02:00
/// URL of the channel's logo image.
String logoUrl,
2020-06-03 13:18:37 +02:00
/// URL of the channel's banner image.
String bannerUrl,
/// The (approximate) channel subscriber's count.
int? subscribersCount,
) = _Channel;
/// Channel URL.
2022-04-30 17:49:34 +02:00
String get url => 'http://127.0.0.1:8080/www.youtube.com:443/channel/$id';
const Channel._();
2020-06-03 13:18:37 +02:00
}