ParsedNumberFormat.currency constructor

ParsedNumberFormat.currency({
  1. String? locale,
  2. String? currencyName,
  3. String? currencySymbol,
  4. String? decimalSeparator,
  5. String? groupSeparator,
  6. bool allowNegative = true,
})

Implementation

factory ParsedNumberFormat.currency({
  String? locale,
  String? currencyName,
  String? currencySymbol,
  String? decimalSeparator,
  String? groupSeparator,
  bool allowNegative = true,
}) {
  final currentLocale = verifiedLocale(locale, NumberFormat.localeExists)!;
  final symbols = numberFormatSymbols[currentLocale] as NumberSymbols;
  final pattern = symbols.CURRENCY_PATTERN;

  return ParsedNumberFormat._withMask(
    mask: pattern,
    locale: currentLocale,
    symbols: symbols,
    currencyName: currencyName,
    currencySymbol: currencySymbol,
    minimalFractionDigits: 0,
    decimalSeparator: decimalSeparator,
    groupSeparator: groupSeparator,
    allowNegative: allowNegative,
  );
}