NewDecimalValidator constructor

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

Implementation

NewDecimalValidator(
  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,
        ),
      ]);