required static method

String? required(
  1. String? value
)

Implementation

static String? required(String? value) {
  if (value == null || value.trim().isEmpty) {
    return 'Questo campo non può essere vuoto';
  }
  return null;
}