DecimalValidationController constructor
DecimalValidationController({})
Implementation
DecimalValidationController(
{String message = 'Text must be an decimal number',
bool required = false})
: super(
message: message,
isValid: ({controller}) {
String? textValue = controller?.rawValue?.toString();
if (!required && TextUtils.isEmpty(textValue)) return true;
return double.tryParse(textValue!) != null;
});