isRequired static method
Implementation
static bool isRequired(String? value, {bool allowEmptySpaces = true}) {
if (value == null || value.isEmpty) {
return false;
} else {
if (!allowEmptySpaces) {
// Check if the string is not only made of empty spaces
if (RegExp(r"\s").hasMatch(value)) {
return false;
}
}
return true; // passed
}
}