toYesNo method
Converts the boolean to a string representation: 'Yes' for true, 'No' for false.
Example:
bool flag = true;
print(flag.toYesNo()); // Output: Yes
Implementation
String toYesNo() => this ? 'Yes' : 'No';
Converts the boolean to a string representation: 'Yes' for true, 'No' for false.
Example:
bool flag = true;
print(flag.toYesNo()); // Output: Yes
String toYesNo() => this ? 'Yes' : 'No';