copyWith method

FiatCurrency copyWith({
  1. String? code,
  2. String? name,
  3. String? decimalMark,
  4. String? thousandsSeparator,
  5. String? symbol,
  6. List<String>? alternateSymbols,
  7. String? disambiguateSymbol,
  8. String? htmlEntity,
  9. String? codeNumeric,
  10. List<String>? namesNative,
  11. int? priority,
  12. int? smallestDenomination,
  13. String? subunit,
  14. int? subunitToUnit,
  15. bool? unitFirst,
  16. List<TranslatedName>? translations,
})

Creates a new instance of FiatCurrency with updated properties.

The optional named parameters can be used to specify new values for the corresponding properties. If a named parameter is not provided, the corresponding property is copied from the original instance.

Example usage:

const taka = FiatBdt();

final shortTaka = taka.copyWith(name: 'Taka');

Implementation

FiatCurrency copyWith({
  String? code,
  String? name,
  String? decimalMark,
  String? thousandsSeparator,
  String? symbol,
  List<String>? alternateSymbols,
  String? disambiguateSymbol,
  String? htmlEntity,
  String? codeNumeric,
  List<String>? namesNative,
  int? priority,
  int? smallestDenomination,
  String? subunit,
  int? subunitToUnit,
  bool? unitFirst,
  List<TranslatedName>? translations,
}) =>
    FiatCurrency(
      code: code ?? this.code,
      name: name ?? this.name,
      namesNative: namesNative ?? this.namesNative,
      codeNumeric: codeNumeric ?? this.codeNumeric,
      translations: translations ?? this.translations,
      alternateSymbols: alternateSymbols ?? this.alternateSymbols,
      disambiguateSymbol: disambiguateSymbol ?? this.disambiguateSymbol,
      htmlEntity: htmlEntity ?? this.htmlEntity,
      priority: priority ?? this.priority,
      smallestDenomination: smallestDenomination ?? this.smallestDenomination,
      subunit: subunit ?? this.subunit,
      subunitToUnit: subunitToUnit ?? this.subunitToUnit,
      unitFirst: unitFirst ?? this.unitFirst,
      symbol: symbol ?? this.symbol,
      decimalMark: decimalMark ?? this.decimalMark,
      thousandsSeparator: thousandsSeparator ?? this.thousandsSeparator,
    );