NumberInputFormatter constructor

NumberInputFormatter({
  1. num? min,
  2. num? max,
  3. num? step,
  4. int? precision,
  5. bool? stepStrictly,
})

Implementation

NumberInputFormatter({
  this.min,
  this.max,
  num? step,
  this.precision,
  bool? stepStrictly,
})  : step = step ?? 1,
      assert(
        precision == null || precision >= 0,
        'precision 精度必须为非负整数',
      ),
      assert(
        min == null || max == null || min <= max,
        'min 必须小于或等于 max',
      ),
      stepStrictly = stepStrictly ?? false;