paint method
Implementation
@override
void paint(PaintingContext context, Offset offset) {
final EdgeInsets padding = style.padding;
final TextStyle textStyle = _getTextStyle();
final Color backgroundColor = _getBackgroundColor();
final TextStyle bgStyle = TextStyle(backgroundColor: backgroundColor);
for (int y = 0; y < size!.height; y++) {
for (int x = 0; x < size!.width; x++) {
context.buffer.writeStyled(offset.x + x, offset.y + y, ' ', bgStyle);
}
}
final int textX = offset.x + padding.left;
final int textY = offset.y + padding.top;
int x = textX;
for (int i = 0; i < text.length; i++) {
final String ch = text[i];
context.buffer.writeStyled(x, textY, ch, textStyle);
x += charWidth(ch.codeUnitAt(0));
}
}