copyWith method

OfferModel copyWith({
  1. String? uid,
  2. String? offerId,
  3. bool? canBeReservedWithoutPay,
  4. String? priceGuaranteeExpiresAt,
  5. String? paymentRequiredBy,
  6. double? profit,
  7. String? tripType,
  8. double? taxUsd,
  9. String? currency,
  10. double? onlinePrice,
  11. double? discountedPrice,
  12. String? discountedPercentage,
  13. double? mileageCost,
  14. double? totalOnlinePrice,
  15. double? totalDiscountedPrice,
  16. bool? isDiscounted,
  17. double? adultCost,
  18. bool? searchCreditUsed,
  19. String? source,
  20. List<String>? duffelPassengerIds,
  21. bool? searchedWithCredit,
  22. String? program,
  23. double? totalCostUsdWithTax,
  24. String? duffelOffer,
  25. String? flightClass,
  26. String? flightSubClass,
  27. double? milesToGain,
  28. double? totalDiscountedPriceBTC,
  29. List<TripModel>? trips,
  30. List<PricingOption>? pricingOptions,
  31. EstimateRateQuote? estimate,
  32. bool? updatedOnlinePrice,
})

Implementation

OfferModel copyWith({
  String? uid,
  String? offerId,
  bool? canBeReservedWithoutPay,
  String? priceGuaranteeExpiresAt,
  String? paymentRequiredBy,
  double? profit,
  String? tripType,
  double? taxUsd,
  String? currency,
  double? onlinePrice,
  double? discountedPrice,
  String? discountedPercentage,
  double? mileageCost,
  double? totalOnlinePrice,
  double? totalDiscountedPrice,
  bool? isDiscounted,
  double? adultCost,
  bool? searchCreditUsed,
  String? source,
  List<String>? duffelPassengerIds,
  bool? searchedWithCredit,
  String? program,
  double? totalCostUsdWithTax,
  String? duffelOffer,
  String? flightClass,
  String? flightSubClass,
  double? milesToGain,
  double? totalDiscountedPriceBTC,
  List<TripModel>? trips,
  List<PricingOption>? pricingOptions,
  EstimateRateQuote? estimate,
  bool? updatedOnlinePrice,
}) {
  return OfferModel(
    uid: uid ?? this.uid,
    offerId: offerId ?? this.offerId,
    canBeReservedWithoutPay: canBeReservedWithoutPay ?? this.canBeReservedWithoutPay,
    priceGuaranteeExpiresAt: priceGuaranteeExpiresAt ?? this.priceGuaranteeExpiresAt,
    paymentRequiredBy: paymentRequiredBy ?? this.paymentRequiredBy,
    profit: profit ?? this.profit,
    tripType: tripType ?? this.tripType,
    taxUsd: taxUsd ?? this.taxUsd,
    currency: currency ?? this.currency,
    onlinePrice: onlinePrice ?? this.onlinePrice,
    discountedPrice: discountedPrice ?? this.discountedPrice,
    discountedPercentage: discountedPercentage ?? this.discountedPercentage,
    mileageCost: mileageCost ?? this.mileageCost,
    totalOnlinePrice: totalOnlinePrice ?? this.totalOnlinePrice,
    totalDiscountedPrice: totalDiscountedPrice ?? this.totalDiscountedPrice,
    isDiscounted: isDiscounted ?? this.isDiscounted,
    adultCost: adultCost ?? this.adultCost,
    searchCreditUsed: searchCreditUsed ?? this.searchCreditUsed,
    source: source ?? this.source,
    duffelPassengerIds: duffelPassengerIds ?? this.duffelPassengerIds,
    searchedWithCredit: searchedWithCredit ?? this.searchedWithCredit,
    program: program ?? this.program,
    totalCostUsdWithTax: totalCostUsdWithTax ?? this.totalCostUsdWithTax,
    duffelOffer: duffelOffer ?? this.duffelOffer,
    flightClass: flightClass ?? this.flightClass,
    flightSubClass: flightSubClass ?? this.flightSubClass,
    milesToGain: milesToGain ?? this.milesToGain,
    totalDiscountedPriceBTC: totalDiscountedPriceBTC ?? this.totalDiscountedPriceBTC,
    trips: trips ?? this.trips,
    pricingOptions: pricingOptions ?? this.pricingOptions,
    estimate: estimate ?? this.estimate,
    updatedOnlinePrice:  updatedOnlinePrice ?? this.updatedOnlinePrice
  );
}