drawText method

void drawText(
  1. TextPainter tp,
  2. Offset offset, [
  3. double? rotateAngle
])

Paints a text on the Canvas

Gets a TextPainter and call its TextPainter.paint using our canvas

Implementation

void drawText(TextPainter tp, Offset offset, [double? rotateAngle]) {
  if (rotateAngle == null) {
    tp.paint(canvas, offset);
  } else {
    drawRotated(
      size: tp.size,
      drawOffset: offset,
      angle: rotateAngle,
      drawCallback: () {
        tp.paint(canvas, offset);
      },
    );
  }
}