ParsedNumberFormat.integer constructor

ParsedNumberFormat.integer({
  1. String? locale,
  2. String? groupSeparator,
  3. bool allowNegative = true,
})

Implementation

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

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