decimalValueFormatter static method
validation input decimal value
Implementation
static decimalValueFormatter(
{int decimalPlaceValue = 2, bool allowedSign = false}) {
return allowedSign
? FilteringTextInputFormatter.allow(
RegExp(r'^\d+\.?\d{0,' "${decimalPlaceValue.toString()}" '}'))
: FilteringTextInputFormatter.allow(
RegExp(r'^\d+\.?\d{0,' "${decimalPlaceValue.toString()}" '}'));
}