youtube_explode/lib/src/channels/channel_video.dart

31 lines
620 B
Dart
Raw Normal View History

import 'package:freezed_annotation/freezed_annotation.dart';
2021-04-30 23:49:49 +02:00
2020-07-16 20:02:54 +02:00
import '../videos/video_id.dart';
2020-07-10 22:28:19 +02:00
part 'channel_video.freezed.dart';
2020-07-10 22:28:19 +02:00
/// Metadata related to a search query result (playlist)
@freezed
class ChannelVideo with _$ChannelVideo {
const factory ChannelVideo(
/// Video ID.
VideoId videoId,
/// Video title.
String videoTitle,
2021-04-30 23:49:49 +02:00
/// Video duration
Duration videoDuration,
2021-04-30 23:49:49 +02:00
/// Video thumbnail
String videoThumbnail,
2020-07-10 22:28:19 +02:00
/// Video upload date.
/// Formatted like 10 hours ago
String videoUploadDate,
2020-07-10 22:28:19 +02:00
/// Video view count.
int videoViews,
) = _ChannelVideo;
2020-07-10 22:28:19 +02:00
}