drawText method
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);
},
);
}
}