copyWith method

Money copyWith({
  1. double? amount,
  2. Currency? currency,
})

Creates a copy of this Money instance where the only changes are those specified in the parameters of this method.

Implementation

Money copyWith({
  double? amount,
  Currency? currency,
}) =>
    Money(
      amount: amount ?? this.amount,
      currency: currency ?? this.currency,
    );