getTextPainter2 method

TextPainter getTextPainter2(
  1. dynamic text,
  2. dynamic color
)

Implementation

TextPainter getTextPainter2(text, color) {
  if (color == null) {
    color = this.chartColors.defaultTextColor;
  }
  TextSpan span = TextSpan(text: '$text', style: getTextStyle2(color));
  TextPainter tp = TextPainter(text: span, textDirection: TextDirection.ltr);
  tp.layout();
  return tp;
}