calculateSize method

  1. @override
Size calculateSize(
  1. int count
)
override

Calculates the size of canvas based on dots count, size and spacing

Other effects can override this function to calculate their own size

Implementation

@override
Size calculateSize(int count) {
  // Add the expanded dot width to our size calculation
  return Size(
      ((dotWidth + spacing) * (count - 1)) + (expansionFactor * dotWidth),
      dotHeight);
}