hasText method
Initialise the interface Check and return if it is a text and not empty
Implementation
// TextVisibility({
// required this.text,
// this.shouldHideText
// });
/// Check and return if it is a text and not empty
bool hasText() {
if (text is String) {
return text!.isNotEmpty && !(shouldHideText ?? false);
} else {
return false;
}
}