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