validateTextField method

String? validateTextField(
  1. String? value
)

Implementation

String? validateTextField(String? value) {
  if (value!.isEmpty) {
    return "This field is empty";
  } else {
    return null;
  }
}