draw method
- @override
- 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);
}