isEmpty static method

bool isEmpty(
  1. String? text
)

Check if string is empty or null

text - The text to validate Returns true if text is empty or null

Implementation

static bool isEmpty(String? text) {
  return text == null || text.trim().isEmpty;
}