paint method
Paints this render object into the given context at offset.
Implementation
@override
void paint(PaintingContext context, Offset offset) {
_ensureStylesCached();
final TextStyle bgStyle = _cachedBgStyle!;
final TextStyle fgBgStyle = _cachedFgBgStyle!;
final int textW = _textWidth;
final int x = offset.x;
final int y = offset.y;
context.fillBackground(x, y, textW + 4, bgStyle);
final int cx = context.writeString(x + 1, y, _text, fgBgStyle);
final String arrow = _isOpen
? ' ${BoxDrawingConstants.arrowUp}'
: ' ${BoxDrawingConstants.arrowDown}';
context.writeString(cx, y, arrow, fgBgStyle);
}