copyWith method
Returns a copy with the given fields replaced. For a nullable
field pass a function, e.g. field: () => null to clear it.
Implementation
@override
LinkPreviewTypeEmbeddedVideoPlayer copyWith({
String? url,
Video? Function()? video,
Photo? Function()? thumbnail,
int? duration,
int? width,
int? height,
}) => LinkPreviewTypeEmbeddedVideoPlayer(
url: url ?? this.url,
video: video != null ? video() : this.video,
thumbnail: thumbnail != null ? thumbnail() : this.thumbnail,
duration: duration ?? this.duration,
width: width ?? this.width,
height: height ?? this.height,
);