DecimalValidator constructor

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

Implementation

DecimalValidator(
  this.precision, {
  this.decimalSeparator = ',',
  this.thousandSeparator = '.',
}) : assert(precision >= 0, 'precision must be equals or greater than zero.'),
     super(<TextInputFormatter>[
       DecimalTextFormatter(
         precision: precision,
         decimalSeparator: decimalSeparator,
         thousandSeparator: thousandSeparator,
       ),
     ]);