showText method
Future<void>
showText(
- String text, {
- int x = 1,
- int y = 1,
- int? maxWidth = 640,
- int? maxHeight,
- PaletteColors? color,
- Alignment2D align = Alignment2D.topLeft,
Shows text on the display.
Args: text (String): The text to display. x (int): The left pixel position to start the text. Defaults to 1. y (int): The top pixel position to start the text. Defaults to 1. maxWidth (int?): The maximum width for the text bounding box. Defaults to 640. maxHeight (int?): The maximum height for the text bounding box. color (PaletteColors?): The color of the text. align (Alignment2D): The alignment of the text. Defaults to Alignment2D.topLeft.
Implementation
Future<void> showText(String text,
{int x = 1,
int y = 1,
int? maxWidth = 640,
int? maxHeight,
PaletteColors? color,
Alignment2D align = Alignment2D.topLeft}) async {
await _writeText(text, true,
x: x,
y: y,
maxWidth: maxWidth,
maxHeight: maxHeight,
color: color,
align: align);
}