render method

  1. @override
void render(
  1. Canvas canvas,
  2. BuildContext context
)
override

How to draw this widget on the canvas

Implementation

@override
void render(Canvas canvas, BuildContext context) {
  if (!hasLayout) {
    hasLayout = true;
    textPainter?.layout(minWidth: bounds.x, maxWidth: bounds.x);
  }
  textPainter?.paint(canvas, Offset.zero);
}