layoutText method
Implementation
void layoutText(Offset offset,RadarBean bean,Canvas canvas){
final scoreTextPainter = TextPainter(
textAlign: TextAlign.center,
text: TextSpan(
text: "${bean.name}\n${bean.score}",
style: bean.textStyle,
),
textDirection: TextDirection.ltr,
);
scoreTextPainter.layout();
final scoreOffset = Offset(
offset.dx - scoreTextPainter.width / 2,
offset.dy - scoreTextPainter.height / 2,
);
scoreTextPainter.paint(canvas, scoreOffset);
}