onPaint property

PaintedPathCallback? onPaint
final

Callback is evoked when a complete path is painted to the canvas.

Returns with the relative index and the Path element itself. If the animation reverses (for examples when applying animation curves) the callback might fire several times for the same path.

The callback fires when the complete Path is painted to the canvas. This does also mean that other Path objects might already been drawn in the same frame. If you want for instance pause a animation after a certain Path element is painted you should consider using the range functionality and use the onFinish callback instead.

Implementation

final PaintedPathCallback? onPaint;