copyWith method

ExchangeRate copyWith({
  1. String? fromCurrency,
  2. String? toCurrency,
  3. Decimal? rate,
  4. DateTime? fetchedAt,
})

Implementation

ExchangeRate copyWith({
  String? fromCurrency,
  String? toCurrency,
  Decimal? rate,
  DateTime? fetchedAt,
}) =>
    ExchangeRate(
      fromCurrency: fromCurrency ?? this.fromCurrency,
      toCurrency: toCurrency ?? this.toCurrency,
      rate: rate ?? this.rate,
      fetchedAt: fetchedAt ?? this.fetchedAt,
    );