genericValidator static method

String? genericValidator(
  1. String? value,
  2. String type
)

Implementation

static String? genericValidator(String? value, String type) {
  if (value == null || value.isEmpty) {
    return "$type cannot be empty";
  }
  return null;
}