paint method
Implementation
@override
void paint(PaintingContext context, Offset offset) {
final TextStyle style = TextStyle(
color: color,
backgroundColor: backgroundColor,
);
context.buffer.writeStyled(offset.x, offset.y, frame, style);
if (label != null && label!.isNotEmpty) {
int cx = offset.x + 2;
for (int i = 0; i < label!.length; i++) {
final String ch = label![i];
context.buffer.writeStyled(cx, offset.y, ch, style);
cx += charWidth(ch.codeUnitAt(0));
}
}
}