toVisibility method
Returns 'Visible' if true, 'Hidden' if false.
Example:
bool flag = false;
print(flag.toVisibility()); // Output: Hidden
Implementation
String toVisibility() => this ? 'Visible' : 'Hidden';
Returns 'Visible' if true, 'Hidden' if false.
Example:
bool flag = false;
print(flag.toVisibility()); // Output: Hidden
String toVisibility() => this ? 'Visible' : 'Hidden';