printHeading static method
Print a heading (centered, larger text).
Convenience method for printing headings.
text: The heading textfontSize: Font size in pointsbold: Whether to use bold textprinterWidth: Printer width in dots
Returns true if printing was successful.
Implementation
static Future<bool> printHeading(
String text, {
double fontSize = 28,
bool bold = true,
int? printerWidth,
}) async {
return await printCenteredText(
text: text,
fontSize: fontSize,
fontWeight: bold ? FontWeight.bold : FontWeight.normal,
printerWidth: printerWidth,
);
}