copyWith method

PreviewConversionModel copyWith({
  1. num? convertedAmount,
  2. num? totalAmount,
  3. num? feeInUSD,
  4. num? feeInToCurrency,
  5. num? feeInFromCurrency,
  6. num? conversionFeeInUSD,
  7. num? conversionFeeInToCurrency,
  8. num? conversionFeeInFromCurrency,
  9. num? fromRate,
  10. num? toRate,
  11. num? intermediateUSDAmount,
})

Implementation

PreviewConversionModel copyWith({
  num? convertedAmount,
  num? totalAmount,
  num? feeInUSD,
  num? feeInToCurrency,
  num? feeInFromCurrency,
  num? conversionFeeInUSD,
  num? conversionFeeInToCurrency,
  num? conversionFeeInFromCurrency,
  num? fromRate,
  num? toRate,
  num? intermediateUSDAmount,
}) {
  return PreviewConversionModel(
    convertedAmount: convertedAmount ?? this.convertedAmount,
    totalAmount: totalAmount ?? this.totalAmount,
    feeInUSD: feeInUSD ?? this.feeInUSD,
    feeInToCurrency: feeInToCurrency ?? this.feeInToCurrency,
    feeInFromCurrency: feeInFromCurrency ?? this.feeInFromCurrency,
    conversionFeeInUSD: conversionFeeInUSD ?? this.conversionFeeInUSD,
    conversionFeeInToCurrency:
        conversionFeeInToCurrency ?? this.conversionFeeInToCurrency,
    conversionFeeInFromCurrency:
        conversionFeeInFromCurrency ?? this.conversionFeeInFromCurrency,
    fromRate: fromRate ?? this.fromRate,
    toRate: toRate ?? this.toRate,
    intermediateUSDAmount:
        intermediateUSDAmount ?? this.intermediateUSDAmount,
  );
}