copyWith method

  1. @override
LinkPreviewTypeEmbeddedAnimationPlayer copyWith({
  1. String? url,
  2. Animation? animation()?,
  3. Photo? thumbnail()?,
  4. int? duration,
  5. int? width,
  6. int? height,
})
override

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,
);