validateEmpty function

String? validateEmpty(
  1. String? value
)

Implementation

String? validateEmpty(String? value) {
  if (value == null || value.isEmpty) {
    return 'This field is required!';
  }
  return null;
}