notNull static method
Checks that checkValue
is not null.
If checkValue
is null the function will return errorMessage
if provided,
or the default error if not. Otherwise null
is returned
Implementation
static String? notNull(String? checkValue, {String? errorMessage}) {
if (checkValue == null) {
return errorMessage ?? "Field can't be empty";
}
return null;
}