PaintBackground typedef Null safety

PaintBackground = bool Function(BackgroundTextSpan backgroundTextSpan, Canvas canvas, Offset offset, TextPainter? painter, Rect rect, {Offset? endOffset, TextPainter? wholeTextPainter})

if you don't want use default, please return true. endOffset is the text top-right Offfset allTextPainter is the text painter of extended text. painter is current background text painter

Implementation

typedef PaintBackground = bool Function(BackgroundTextSpan backgroundTextSpan,
    Canvas canvas, Offset offset, TextPainter? painter, Rect rect,
    {Offset? endOffset, TextPainter? wholeTextPainter});