getSampleCount method

  1. @override
int getSampleCount(
  1. double pathLength
)
override

Get number of samples to use for bend detection based on path length

Implementation

@override
int getSampleCount(double pathLength) {
  // Fewer samples needed since we have exact bend points
  return math.min(12, math.max(3, (pathLength / 25).ceil()));
}