Paints the text onto the given canvas at the given offset.
Valid only after layout has been called.
Source
void paint(Canvas canvas, Offset offset) {
assert(() {
if (_needsLayout) {
throw new FlutterError(
'TextPainter.paint called when text geometry was not yet calculated.\n'
'Please call layout() before paint() to position the text before painting it.'
);
}
return true;
});
canvas.drawParagraph(_paragraph, offset);
}