printUnderlinedText static method
Print text with an underline.
Creates underlined text for emphasis.
text: The text to underlineunderlineChar: Character to use for the underlineaddNewLine: Whether to add a newline after the underlined text
Returns true if printing was successful.
Implementation
static Future<bool> printUnderlinedText(
String text, {
String underlineChar = '-',
bool addNewLine = true,
}) async {
final underline = underlineChar * text.length;
final combinedText = '$text\n$underline${addNewLine ? '\n' : ''}';
return await printText(combinedText);
}