text method
Implementation
void text(BitmapText bitmapText) {
assert(image == null);
final textPainter = TextPainter(
text: TextSpan(
text: bitmapText.text,
style: bitmapText.style ?? defaultTextStyle,
),
textDirection: ui.TextDirection.ltr,
textAlign: bitmapText.textAlign,
);
textPainter.layout(minWidth: _maxX, maxWidth: _maxX);
textPainter.paint(canvas, ui.Offset(_minX, _y));
_y += textPainter.height;
}