copyWith method Null safety

VideoMetadata copyWith(
  1. {VideoFull? video,
  2. List<Comment>? comments,
  3. List<Video>? recommendations}
)

Implementation

VideoMetadata copyWith({
  VideoFull? video,
  List<Comment>? comments,
  List<Video>? recommendations,
}) {
  return VideoMetadata(
    video: video ?? this.video,
    comments: comments ?? this.comments,
    recommendations: recommendations ?? this.recommendations,
  );
}