copyWith method Null safety

  1. @override
VideoWithComments copyWith(
  1. {String? id,
  2. String? title,
  3. VideoType? type,
  4. String? topicId,
  5. String? publishedAt,
  6. String? availableAt,
  7. int? duration,
  8. VideoStatus? status,
  9. String? startScheduled,
  10. String? startActual,
  11. String? endActual,
  12. int? liveViewers,
  13. String? description,
  14. int? songcount,
  15. String? channelId,
  16. ChannelMin? channel,
  17. String? language,
  18. List<Comment>? comments}
)
override

Implementation

@override
VideoWithComments copyWith({
  String? id,
  String? title,
  VideoType? type,
  String? topicId,
  String? publishedAt,
  String? availableAt,
  int? duration,
  VideoStatus? status,
  String? startScheduled,
  String? startActual,
  String? endActual,
  int? liveViewers,
  String? description,
  int? songcount,
  String? channelId,
  ChannelMin? channel,
  String? language,
  List<Comment>? comments,
}) {
  return VideoWithComments(
    id: id ?? this.id,
    title: title ?? this.title,
    type: type ?? this.type,
    topicId: topicId ?? this.topicId,
    publishedAt: publishedAt ?? this.publishedAt,
    availableAt: availableAt ?? this.availableAt,
    duration: duration ?? this.duration,
    status: status ?? this.status,
    startScheduled: startScheduled ?? this.startScheduled,
    startActual: startActual ?? this.startActual,
    endActual: endActual ?? this.endActual,
    liveViewers: liveViewers ?? this.liveViewers,
    description: description ?? this.description,
    songcount: songcount ?? this.songcount,
    channelId: channelId ?? this.channelId,
    channel: channel ?? this.channel,
    language: language ?? this.language,
    comments: comments ?? this.comments,
  );
}