draw method

  1. @override
void draw(
  1. Canvas canvas
)
override

Implementation

@override
void draw(Canvas canvas) {
  final textPainter = TextPainter(
    text: TextSpan(
      text: text,
      style: TextStyle(color: color, fontSize: 14.0),
    ),
    textDirection: TextDirection.ltr,
  )..layout();
  textPainter.paint(canvas, offset);
}