paintFeature method Null safety

  1. @override
void paintFeature(
  1. Canvas canvas,
  2. Matrix4 transform

Override this method to paint the ink feature.

The transform argument gives the coordinate conversion from the coordinate system of the canvas to the coordinate system of the referenceBox.


void paintFeature(Canvas canvas, Matrix4 transform) {
  final Paint paint = Paint()..color = color.withAlpha(_alpha.value);
  Offset? center = _position;
  if (_repositionToReferenceBox)
    center = Offset.lerp(center,, _radiusController.value);
    canvas: canvas,
    transform: transform,
    paint: paint,
    center: center!,
    textDirection: _textDirection,
    radius: _radius.value,
    customBorder: _customBorder,
    borderRadius: _borderRadius,
    clipCallback: _clipCallback,