call method

  1. @override
String? call(
  1. String? value
)
override

Call is a special function that makes a class callable returns null if the input is valid otherwise it returns the provided error

Implementation

@override
String? call(String? value) {
  if (value == null) {
    return null;
  }

  return (value.isEmpty && ignoreEmptyValues) ? null : super(value);
}