DecimalTextFormatter constructor

DecimalTextFormatter({
  1. required int precision,
  2. String decimalSeparator = ',',
  3. String thousandSeparator = '.',
})

Implementation

DecimalTextFormatter({
  required this.precision,
  this.decimalSeparator = ',',
  this.thousandSeparator = '.',
}) : allow = precision > 0
         ? RegExp('[-0-9$decimalSeparator$thousandSeparator]')
         : RegExp('[-0-9$thousandSeparator]');