isNotEmpty static method

bool isNotEmpty(
  1. String? text
)

Check if string is not empty and not null

text - The text to validate Returns true if text is not empty and not null

Implementation

static bool isNotEmpty(String? text) {
  return text != null && text.trim().isNotEmpty;
}