hasText method

bool hasText()

Check and return if it is a text and not empty

Implementation

bool hasText() {
  if (text is String) {
    return text!.isNotEmpty && !(shouldHideText ?? false);
  } else {
    return false;
  }
}