validateEmpty static method

String? validateEmpty(
  1. String value,
  2. String label
)

Implementation

static String? validateEmpty(String value, String label) {
  if (value.trim().isEmpty) return enter + label;

  return null;
}