Video constructor

Video(
  1. VideoId id,
  2. String title,
  3. String author,
  4. ChannelId channelId,
  5. DateTime? uploadDate,
  6. String? uploadDateRaw,
  7. DateTime? publishDate,
  8. String description,
  9. Duration? duration,
  10. ThumbnailSet thumbnails,
  11. Iterable<String>? keywords,
  12. Engagement engagement,
  13. bool isLive, [
  14. @internal WatchPage? watchPage,
])

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);
}