Video constructor
Video(])
Implementation
factory Video(
/// Video ID.
VideoId id,
/// Video title.
String title,
/// Video author.
String author,
/// Video author Id.
ChannelId channelId,
/// Video upload date.
/// Note: For search queries it is calculated with:
/// DateTime.now() - how much time is was published.
DateTime? uploadDate,
String? uploadDateRaw,
/// Video publish date.
DateTime? publishDate,
/// Video description.
String description,
/// Duration of the video.
Duration? duration,
/// Available thumbnails for this video.
ThumbnailSet thumbnails,
/// Search keywords used for this video.
Iterable<String>? keywords,
/// Engagement statistics for this video.
Engagement engagement,
/// Returns true if this is a live stream.
//ignore: avoid_positional_boolean_parameters
bool isLive,
[
/// Used internally.
/// Shouldn't be used in the code.
@internal WatchPage? watchPage]) {
return Video._internal(
/// Video ID.
id,
/// Video title.
title,
/// Video author.
author,
/// Video author Id.
channelId,
/// Video upload date.
/// Note: For search queries it is calculated with:
/// DateTime.now() - how much time is was published.
uploadDate,
uploadDateRaw,
/// Video publish date.
publishDate,
description,
duration,
thumbnails,
UnmodifiableListView(keywords ?? const Iterable.empty()),
engagement,
isLive,
watchPage);
}