Check if string is empty or null
text - The text to validate Returns true if text is empty or null
text
static bool isEmpty(String? text) { return text == null || text.trim().isEmpty; }