copyWith method

Movie copyWith({
  1. String? id,
  2. String? name,
  3. String? description,
  4. String? photoUrl,
  5. double? rating,
  6. int? duration,
  7. int? price,
})

Implementation

Movie copyWith({
  String? id,
  String? name,
  String? description,
  String? photoUrl,
  double? rating,
  int? duration,
  int? price,
}) {
  return Movie(
    id: id ?? this.id,
    name: name ?? this.name,
    photoUrl: photoUrl ?? this.photoUrl,
    description: description ?? this.description,
    rating: rating ?? this.rating,
    duration: duration ?? this.duration,
    price: price ?? this.price,
  );
}