INNER CODE UNIT · Dart
radius
vintage/scratcher · lib/widgets.dart:258
final radius = widget.brushSize / 2;
checkpoints.removeWhere(
(checkpoint) => _inCircle(checkpoint, point!, radius),
);
progress =
((totalCheckpoints - checkpoints.length) / totalCheckpoints) * 100;
if (progress - progressReported >= _progressReportStep ||
progress == 100) {
progressReported = progress;
widget.onChange?.call(progress);
}
if (!thresholdReported &&
widget.threshold != null &&
progress >= widget.threshold!) {
thresholdReported = true;
widget.onThreshold?.call();