drawKeyboardAccelerator method Null safety

  1. @override
void drawKeyboardAccelerator(
  1. Canvas canvas
)
override

Implementation

@override
void drawKeyboardAccelerator(Canvas canvas) {
  super.drawKeyboardAccelerator(canvas);
  const s = TextStyle(
      fontSize: 20, fontFamily: 'KeyLabelFont', color: Color(0xff5fe88d));
  const double x = -29;
  double y = 7 + s.fontSize! * 3.7;
  TextPainter p = TextPainter(
      text: TextSpan(style: s, text: extraAcceleratorName),
      textAlign: TextAlign.right,
      textDirection: TextDirection.ltr);
  p.layout(minWidth: 29);
  p.paint(canvas, Offset(x, y));
  y += s.fontSize!;
}