showText method

Future<void> showText(
  1. String text, {
  2. int x = 1,
  3. int y = 1,
  4. int? maxWidth = 640,
  5. int? maxHeight,
  6. PaletteColors? color,
  7. 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);
}