xxxxxxxxxx
static TextEditingValue onlyIntegersFormatter(final TextEditingValue oldValue, final TextEditingValue newValue, {final int? precision}) {
if (newValue.text.isEmpty || newValue.text == '-') {
return newValue;
} else {
// Check if the input can be parsed into an Int and returns the previous input otherwise.
final int? newVal = int.tryParse(newValue.text);
if (newVal == null) {
return oldValue;
} else {
// Check for number of digits.
if (digits != null) {
return math.pow(10, precision) > newVal.abs() ? newValue : oldValue;
}
return newValue;
}
}
};
xxxxxxxxxx
//Check if the command you put into perf is not failing, perhaps you are
//missing some parameters or it needs to be run with permissions