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
LinkPreviewTypeEmbeddedAudioPlayer copyWith({
String? url,
Audio? Function()? audio,
Photo? Function()? thumbnail,
int? duration,
int? width,
int? height,
}) => LinkPreviewTypeEmbeddedAudioPlayer(
url: url ?? this.url,
audio: audio != null ? audio() : this.audio,
thumbnail: thumbnail != null ? thumbnail() : this.thumbnail,
duration: duration ?? this.duration,
width: width ?? this.width,
height: height ?? this.height,
);