copyWith method
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,
})
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
);
}