drawWhiteText method Null safety

  1. @override
void drawWhiteText(
  1. Canvas canvas,
  2. TextStyle style,
  3. String text,
  4. double w
)
override

Implementation

@override
void drawWhiteText(Canvas canvas, TextStyle style, String text, double w) {
  super.drawWhiteText(canvas, style, text, w);
  // Extend the line on the top of the square root symbol
  TextSpan span = TextSpan(style: style, text: '\u203E');
  TextPainter tp = TextPainter(
      text: span,
      textAlign: TextAlign.center,
      textDirection: TextDirection.ltr);
  tp.layout(minWidth: w);
  tp.paint(canvas, keyTextOffset.translate(8.4, -2.2));
  tp.paint(canvas, keyTextOffset.translate(16, -2.2));
}