ThousandsFormatter constructor

ThousandsFormatter({
  1. NumberFormat? formatter,
  2. bool allowFraction = false,
})

Implementation

ThousandsFormatter({this.formatter, this.allowFraction = false})
    : _decimalSeparator = (formatter ?? _formatter).symbols.DECIMAL_SEP,
      _decimalRegex = RegExp(allowFraction
          ? '[0-9]+([${(formatter ?? _formatter).symbols.DECIMAL_SEP}])?'
          : r'\d+'),
      _decimalFormatter = FilteringTextInputFormatter.allow(RegExp(
          allowFraction
              ? '[0-9]+([${(formatter ?? _formatter).symbols.DECIMAL_SEP}])?'
              : r'\d+'));