copyWith method

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

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({
  List<String>? alternateSymbols,
  String? code,
  String? codeNumeric,
  String? decimalMark,
  String? disambiguateSymbol,
  String? htmlEntity,
  String? name,
  List<String>? namesNative,
  int? priority,
  int? smallestDenomination,
  String? subunit,
  int? subunitToUnit,
  String? symbol,
  String? thousandsSeparator,
  List<TranslatedName>? translations,
  bool? unitFirst,
}) =>
    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,
    );