copyWith abstract method

Currency copyWith({
  1. String? currencyCode,
  2. String? symbol,
  3. int? defaultFractionDigits,
  4. int? numericCode,
  5. String? displayName,
})

Creates a copy of this currency with optional overrides.

Example:

final usd = Currency.getInstance('USD');
final customUsd = usd.copyWith(symbol: 'US$');

Implementation

Currency copyWith({
  String? currencyCode,
  String? symbol,
  int? defaultFractionDigits,
  int? numericCode,
  String? displayName,
});