copyWith method

PaymentDetails copyWith({
  1. String? route,
  2. String? bookingId,
  3. String? tripType,
  4. double? totalOnlinePrice,
  5. double? totalDiscountedPrice,
  6. String? discountPercentage,
  7. double? totalTax,
  8. FromAirport? fromAirport,
  9. FromAirport? toAirport,
  10. int? totalPassengers,
  11. int? totalMilesEarned,
  12. String? email,
  13. double? donationAmount,
  14. bool? isNonDiscounted,
  15. int? searchCreditEarned,
  16. int? searchCreditUsed,
  17. List<BookingTrips>? bookingTrips,
  18. OfferModel? offer,
  19. TripModel? departureTrip,
  20. TripModel? returnTrip,
  21. double? milesUsed,
  22. int? adults,
  23. int? children,
  24. int? infantsInLap,
  25. int? infantsInSeat,
  26. double? totalDiscountedPriceBTC,
  27. List<Passengers>? passengers,
  28. DateTime? rateConfirmedAt,
  29. int? availabilityCheckedAt,
  30. bool? isStillAvailable,
  31. int? availabilityCheckCounter,
  32. int? approvedAt,
  33. String? createdAt,
  34. String? status,
})

Implementation

PaymentDetails copyWith({
  String? route,
  String? bookingId,
  String? tripType,
  double? totalOnlinePrice,
  double? totalDiscountedPrice,
  String? discountPercentage,
  double? totalTax,
  FromAirport? fromAirport,
  FromAirport? toAirport,
  int? totalPassengers,
  int? totalMilesEarned,
  String? email,
  double? donationAmount,
  bool? isNonDiscounted,
  int? searchCreditEarned,
  int? searchCreditUsed,
  List<BookingTrips>? bookingTrips,
  OfferModel? offer,
  TripModel? departureTrip,
  TripModel? returnTrip,
  double? milesUsed,
  int? adults,
  int? children,
  int? infantsInLap,
  int? infantsInSeat,
  double? totalDiscountedPriceBTC,
  List<Passengers>? passengers,
  DateTime? rateConfirmedAt,
  int? availabilityCheckedAt,
  bool? isStillAvailable,
  int? availabilityCheckCounter,
  int? approvedAt,
  String? createdAt,
  String? status,
}) {
  return PaymentDetails(
    route: route ?? this.route,
    bookingId: bookingId ?? this.bookingId,
    tripType: tripType ?? this.tripType,
    totalOnlinePrice: totalOnlinePrice ?? this.totalOnlinePrice,
    totalDiscountedPrice: totalDiscountedPrice ?? this.totalDiscountedPrice,
    discountPercentage: discountPercentage ?? this.discountPercentage,
    totalTax: totalTax ?? this.totalTax,
    fromAirport: fromAirport ?? this.fromAirport,
    toAirport: toAirport ?? this.toAirport,
    totalPassengers: totalPassengers ?? this.totalPassengers,
    totalMilesEarned: totalMilesEarned ?? this.totalMilesEarned,
    email: email ?? this.email,
    donationAmount: donationAmount ?? this.donationAmount,
    isNonDiscounted: isNonDiscounted ?? this.isNonDiscounted,
    searchCreditEarned: searchCreditEarned ?? this.searchCreditEarned,
    searchCreditUsed: searchCreditUsed ?? this.searchCreditUsed,
    bookingTrips: bookingTrips ?? this.bookingTrips,
    offer: offer ?? this.offer,
    departureTrip: departureTrip ?? this.departureTrip,
    returnTrip: returnTrip ?? this.returnTrip,
    milesUsed: milesUsed ?? this.milesUsed,
    adults: adults ?? this.adults,
    children: children ?? this.children,
    infantsInLap: infantsInLap ?? this.infantsInLap,
    infantsInSeat: infantsInSeat ?? this.infantsInSeat,
    totalDiscountedPriceBTC: totalDiscountedPriceBTC ?? this.totalDiscountedPriceBTC,
    passengers: passengers ?? this.passengers,
    rateConfirmedAt: rateConfirmedAt ?? this.rateConfirmedAt,
    availabilityCheckedAt: availabilityCheckedAt ?? this.availabilityCheckedAt,
    isStillAvailable: isStillAvailable ?? this.isStillAvailable,
    availabilityCheckCounter: availabilityCheckCounter ?? this.availabilityCheckCounter,
    approvedAt: approvedAt ?? this.approvedAt,
    createdAt: createdAt ?? this.createdAt,
    status: status ?? this.status
  );
}