onValidateField method
Validates the input field for the dropdown based on its current state.
Returns the current validation error if any, otherwise returns null
.
text
: The text to validate.
Implementation
@override
String? onValidateField(text) {
if (validator != null) {
setValidationError = validator!(selectedValue);
}
notifyListeners();
return super.onValidateField(text);
}