checkNotEmpty static method
Returns value, or throws an ArgumentError with message if it is null or empty.
Implementation
static String checkNotEmpty(String? value, String message) {
if (value == null || value.isEmpty) {
throw ArgumentError(message);
} else {
return value;
}
}