layoutTitle method
Implementation
void layoutTitle(Offset offset,RadarBean bean,Canvas canvas){
final scoreTextPainter = TextPainter(
textAlign: TextAlign.center,
text: TextSpan(
text: bean.name,
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);
}