copyWith method

  1. @override
PaidMediaVideo copyWith({
  1. Video? video,
  2. Photo? cover()?,
  3. int? startTimestamp,
})
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
PaidMediaVideo copyWith({
  Video? video,
  Photo? Function()? cover,
  int? startTimestamp,
}) => PaidMediaVideo(
  video: video ?? this.video,
  cover: cover != null ? cover() : this.cover,
  startTimestamp: startTimestamp ?? this.startTimestamp,
);