when<TResult extends Object?> method

  1. @optionalTypeArgs
TResult when<TResult extends Object?>({
  1. required TResult video(
    1. VideoId id,
    2. String title,
    3. String author,
    4. String description,
    5. String duration,
    6. int viewCount,
    7. List<Thumbnail> thumbnails,
    8. String? uploadDate,
    9. bool isLive,
    10. String channelId,
    ),
  2. required TResult playlist(
    1. PlaylistId id,
    2. String title,
    3. int videoCount,
    4. List<Thumbnail> thumbnails,
    ),
  3. required TResult channel(
    1. ChannelId id,
    2. String name,
    3. String description,
    4. int videoCount,
    5. List<Thumbnail> thumbnails,
    ),
})
inherited

Implementation

@optionalTypeArgs
TResult when<TResult extends Object?>({
  required TResult Function(
          VideoId id,
          String title,
          String author,
          String description,
          String duration,
          int viewCount,
          List<Thumbnail> thumbnails,
          String? uploadDate,
          bool isLive,
          String channelId)
      video,
  required TResult Function(PlaylistId id, String title, int videoCount,
          List<Thumbnail> thumbnails)
      playlist,
  required TResult Function(ChannelId id, String name, String description,
          int videoCount, List<Thumbnail> thumbnails)
      channel,
}) =>
    throw _privateConstructorUsedError;